[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [4985] Add an inchoate unit test
From: |
Greg Chicares |
Subject: |
[lmi-commits] [4985] Add an inchoate unit test |
Date: |
Fri, 11 Jun 2010 23:56:54 +0000 |
Revision: 4985
http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=4985
Author: chicares
Date: 2010-06-11 23:56:54 +0000 (Fri, 11 Jun 2010)
Log Message:
-----------
Add an inchoate unit test
Modified Paths:
--------------
lmi/trunk/Makefile.am
lmi/trunk/configurable_settings.cpp
lmi/trunk/objects.make
Added Paths:
-----------
lmi/trunk/configurable_settings_test.cpp
Modified: lmi/trunk/Makefile.am
===================================================================
--- lmi/trunk/Makefile.am 2010-06-11 15:24:18 UTC (rev 4984)
+++ lmi/trunk/Makefile.am 2010-06-11 23:56:54 UTC (rev 4985)
@@ -95,6 +95,7 @@
test_callback \
test_comma_punct \
test_commutation_functions \
+ test_configurable_settings \
test_contains \
test_crc32 \
test_expression_template_0 \
@@ -523,12 +524,26 @@
comma_punct_test.cpp
test_comma_punct_CXXFLAGS = $(AM_CXXFLAGS)
-test_commutation_functions_SOURCES = \
+test_commutation_functions_SOURCES = \
$(common_test_objects) \
commutation_functions.cpp \
commutation_functions_test.cpp
test_commutation_functions_CXXFLAGS = $(AM_CXXFLAGS)
+test_configurable_settings_SOURCES = \
+ $(common_test_objects) \
+ configurable_settings.cpp \
+ configurable_settings_test.cpp \
+ data_directory.cpp \
+ global_settings.cpp \
+ miscellany.cpp \
+ path_utility.cpp \
+ xml_lmi.cpp
+test_configurable_settings_CXXFLAGS = $(AM_CXXFLAGS) $(XMLWRAPP_CFLAGS)
+test_configurable_settings_LDADD = \
+ $(BOOST_LIBS) \
+ $(XMLWRAPP_LIBS)
+
test_contains_SOURCES = \
$(common_test_objects) \
contains_test.cpp
Modified: lmi/trunk/configurable_settings.cpp
===================================================================
--- lmi/trunk/configurable_settings.cpp 2010-06-11 15:24:18 UTC (rev 4984)
+++ lmi/trunk/configurable_settings.cpp 2010-06-11 23:56:54 UTC (rev 4985)
@@ -47,8 +47,6 @@
#include <iterator>
#include <sstream>
-// TODO ?? Need unit tests.
-
namespace
{
std::string const& configuration_filename()
Added: lmi/trunk/configurable_settings_test.cpp
===================================================================
--- lmi/trunk/configurable_settings_test.cpp (rev 0)
+++ lmi/trunk/configurable_settings_test.cpp 2010-06-11 23:56:54 UTC (rev
4985)
@@ -0,0 +1,68 @@
+// Configurable settings--unit test.
+//
+// Copyright (C) 2010 Gregory W. Chicares.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as
+// published by the Free Software Foundation.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software Foundation,
+// Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+//
+// http://savannah.nongnu.org/projects/lmi
+// email: <address@hidden>
+// snail: Chicares, 186 Belle Woods Drive, Glastonbury CT 06033, USA
+
+// $Id$
+
+#ifdef __BORLANDC__
+# include "pchfile.hpp"
+# pragma hdrstop
+#endif // __BORLANDC__
+
+#include "configurable_settings.hpp"
+
+#include "path_utility.hpp" // initialize_filesystem()
+#include "test_tools.hpp"
+
+class configurable_settings_test
+{
+ public:
+ static void test()
+ {
+ test_normal_usage();
+ test_something_else();
+ }
+
+ private:
+ static void test_normal_usage();
+ static void test_something_else();
+};
+
+void configurable_settings_test::test_normal_usage()
+{
+ configurable_settings const& c = configurable_settings::instance();
+ BOOST_TEST(!c.skin_filename().empty());
+}
+
+void configurable_settings_test::test_something_else()
+{
+ // Nothing here yet.
+}
+
+int test_main(int, char*[])
+{
+ // Absolute paths require "native" name-checking policy for msw.
+ initialize_filesystem();
+
+ configurable_settings_test::test();
+
+ return EXIT_SUCCESS;
+}
+
Property changes on: lmi/trunk/configurable_settings_test.cpp
___________________________________________________________________
Added: svn:keywords
+ Id
Modified: lmi/trunk/objects.make
===================================================================
--- lmi/trunk/objects.make 2010-06-11 15:24:18 UTC (rev 4984)
+++ lmi/trunk/objects.make 2010-06-11 23:56:54 UTC (rev 4985)
@@ -450,6 +450,7 @@
callback_test \
comma_punct_test \
commutation_functions_test \
+ configurable_settings_test \
contains_test \
crc32_test \
expression_template_0_test \
@@ -580,6 +581,18 @@
expm1.o \
timer.o \
+configurable_settings_test$(EXEEXT): \
+ $(boost_filesystem_objects) \
+ $(common_test_objects) \
+ $(xmlwrapp_objects) \
+ configurable_settings.o \
+ configurable_settings_test.o \
+ data_directory.o \
+ global_settings.o \
+ miscellany.o \
+ path_utility.o \
+ xml_lmi.o \
+
contains_test$(EXEEXT): \
$(common_test_objects) \
contains_test.o \
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi-commits] [4985] Add an inchoate unit test,
Greg Chicares <=