Browse Source

renamed files names data_def* to module_spec* to reflect their actual content

git-svn-id: svn://bind10.isc.org/svn/bind10/branches/jelte-configuration@872 e5f2f494-b856-4b98-b285-d166d9295462
Jelte Jansen 15 years ago
parent
commit
a532a31468

+ 2 - 2
src/lib/config/cpp/Makefile.am

@@ -1,12 +1,12 @@
 AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/ext -Wall -Werror
 AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/ext -Wall -Werror
 
 
 lib_LIBRARIES = libcfgclient.a
 lib_LIBRARIES = libcfgclient.a
-libcfgclient_a_SOURCES = data_def.h data_def.cc ccsession.cc ccsession.h
+libcfgclient_a_SOURCES = module_spec.h module_spec.cc ccsession.cc ccsession.h
 
 
 TESTS =
 TESTS =
 if HAVE_GTEST
 if HAVE_GTEST
 TESTS += run_unittests
 TESTS += run_unittests
-run_unittests_SOURCES = data_def_unittests.cc run_unittests.cc
+run_unittests_SOURCES = module_spec_unittests.cc run_unittests.cc
 run_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
 run_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
 run_unittests_LDFLAGS = $(AM_LDFLAGS) $(GTEST_LDFLAGS)
 run_unittests_LDFLAGS = $(AM_LDFLAGS) $(GTEST_LDFLAGS)
 run_unittests_LDADD = libcfgclient.a $(GTEST_LDADD)
 run_unittests_LDADD = libcfgclient.a $(GTEST_LDADD)

+ 1 - 1
src/lib/config/cpp/ccsession.cc

@@ -34,7 +34,7 @@
 #include <boost/foreach.hpp>
 #include <boost/foreach.hpp>
 
 
 #include <cc/data.h>
 #include <cc/data.h>
-#include <data_def.h>
+#include <module_spec.h>
 #include <cc/session.h>
 #include <cc/session.h>
 
 
 //#include "common.h"
 //#include "common.h"

+ 1 - 1
src/lib/config/cpp/ccsession.h

@@ -19,7 +19,7 @@
 
 
 #include <string>
 #include <string>
 
 
-#include <config/data_def.h>
+#include <config/module_spec.h>
 #include <cc/session.h>
 #include <cc/session.h>
 #include <cc/data.h>
 #include <cc/data.h>
 
 

+ 1 - 1
src/lib/config/cpp/data_def.cc

@@ -13,7 +13,7 @@
 // NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
 // NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
 // WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 // WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 
-#include "data_def.h"
+#include "module_spec.h"
 
 
 #include <sstream>
 #include <sstream>
 #include <iostream>
 #include <iostream>

src/lib/config/cpp/data_def.h → src/lib/config/cpp/module_spec.h


+ 23 - 23
src/lib/config/cpp/data_def_unittests.cc

@@ -16,7 +16,7 @@
 
 
 #include <gtest/gtest.h>
 #include <gtest/gtest.h>
 
 
-#include <data_def.h>
+#include <module_spec.h>
 
 
 #include <fstream>
 #include <fstream>
 
 
@@ -30,7 +30,7 @@ std::string specfile(const std::string name) {
 }
 }
 
 
 void
 void
-data_def_error(const std::string& file,
+module_spec_error(const std::string& file,
                const std::string& error1,
                const std::string& error1,
                const std::string& error2 = "",
                const std::string& error2 = "",
                const std::string& error3 = "")
                const std::string& error3 = "")
@@ -54,7 +54,7 @@ TEST(ModuleSpec, ReadingSpecfiles) {
     dd = moduleSpecFromFile(specfile("spec2.spec"));
     dd = moduleSpecFromFile(specfile("spec2.spec"));
     EXPECT_EQ(dd.getFullSpec()->get("module_spec")
     EXPECT_EQ(dd.getFullSpec()->get("module_spec")
                                 ->get("config_data")->size(), 6);
                                 ->get("config_data")->size(), 6);
-    data_def_error("doesnotexist",
+    module_spec_error("doesnotexist",
                    "Error opening ",
                    "Error opening ",
                    specfile("doesnotexist"),
                    specfile("doesnotexist"),
                    ": No such file or directory");
                    ": No such file or directory");
@@ -68,54 +68,54 @@ TEST(ModuleSpec, ReadingSpecfiles) {
 }
 }
 
 
 TEST(ModuleSpec, SpecfileItems) {
 TEST(ModuleSpec, SpecfileItems) {
-    data_def_error("spec3.spec",
+    module_spec_error("spec3.spec",
                    "item_name missing in {\"item_default\": 1, \"item_optional\": False, \"item_type\": \"integer\"}");
                    "item_name missing in {\"item_default\": 1, \"item_optional\": False, \"item_type\": \"integer\"}");
-    data_def_error("spec4.spec",
+    module_spec_error("spec4.spec",
                    "item_type missing in {\"item_default\": 1, \"item_name\": \"item1\", \"item_optional\": False}");
                    "item_type missing in {\"item_default\": 1, \"item_name\": \"item1\", \"item_optional\": False}");
-    data_def_error("spec5.spec",
+    module_spec_error("spec5.spec",
                    "item_optional missing in {\"item_default\": 1, \"item_name\": \"item1\", \"item_type\": \"integer\"}");
                    "item_optional missing in {\"item_default\": 1, \"item_name\": \"item1\", \"item_type\": \"integer\"}");
-    data_def_error("spec6.spec",
+    module_spec_error("spec6.spec",
                    "item_default missing in {\"item_name\": \"item1\", \"item_optional\": False, \"item_type\": \"integer\"}");
                    "item_default missing in {\"item_name\": \"item1\", \"item_optional\": False, \"item_type\": \"integer\"}");
-    data_def_error("spec9.spec",
+    module_spec_error("spec9.spec",
                    "item_default not of type integer");
                    "item_default not of type integer");
-    data_def_error("spec10.spec",
+    module_spec_error("spec10.spec",
                    "item_default not of type real");
                    "item_default not of type real");
-    data_def_error("spec11.spec",
+    module_spec_error("spec11.spec",
                    "item_default not of type boolean");
                    "item_default not of type boolean");
-    data_def_error("spec12.spec",
+    module_spec_error("spec12.spec",
                    "item_default not of type string");
                    "item_default not of type string");
-    data_def_error("spec13.spec",
+    module_spec_error("spec13.spec",
                    "item_default not of type list");
                    "item_default not of type list");
-    data_def_error("spec14.spec",
+    module_spec_error("spec14.spec",
                    "item_default not of type map");
                    "item_default not of type map");
-    data_def_error("spec15.spec",
+    module_spec_error("spec15.spec",
                    "badname is not a valid type name");
                    "badname is not a valid type name");
 }
 }
 
 
 TEST(ModuleSpec, SpecfileConfigData)
 TEST(ModuleSpec, SpecfileConfigData)
 {
 {
-    data_def_error("spec7.spec",
+    module_spec_error("spec7.spec",
                    "module_name missing in {}");
                    "module_name missing in {}");
-    data_def_error("spec8.spec",
+    module_spec_error("spec8.spec",
                    "Data specification does not contain module_spec element");
                    "Data specification does not contain module_spec element");
-    data_def_error("spec16.spec",
+    module_spec_error("spec16.spec",
                    "config_data is not a list of elements");
                    "config_data is not a list of elements");
-    data_def_error("spec21.spec",
+    module_spec_error("spec21.spec",
                    "commands is not a list of elements");
                    "commands is not a list of elements");
 }
 }
 
 
 TEST(ModuleSpec, SpecfileCommands)
 TEST(ModuleSpec, SpecfileCommands)
 {
 {
-    data_def_error("spec17.spec",
+    module_spec_error("spec17.spec",
                    "command_name missing in {\"command_args\": [ {\"item_default\": \"\", \"item_name\": \"message\", \"item_optional\": False, \"item_type\": \"string\"} ], \"command_description\": \"Print the given message to stdout\"}");
                    "command_name missing in {\"command_args\": [ {\"item_default\": \"\", \"item_name\": \"message\", \"item_optional\": False, \"item_type\": \"string\"} ], \"command_description\": \"Print the given message to stdout\"}");
-    data_def_error("spec18.spec",
+    module_spec_error("spec18.spec",
                    "command_args missing in {\"command_description\": \"Print the given message to stdout\", \"command_name\": \"print_message\"}");
                    "command_args missing in {\"command_description\": \"Print the given message to stdout\", \"command_name\": \"print_message\"}");
-    data_def_error("spec19.spec",
+    module_spec_error("spec19.spec",
                    "command_args not of type list");
                    "command_args not of type list");
-    data_def_error("spec20.spec",
+    module_spec_error("spec20.spec",
                    "somethingbad is not a valid type name");
                    "somethingbad is not a valid type name");
 /*
 /*
-    data_def_error("spec22.spec",
+    module_spec_error("spec22.spec",
                    "");
                    "");
 */
 */
 }
 }