Browse Source

removed manual test binary (this 'test' belongs in a to-be made data_spec_unittests file)

git-svn-id: svn://bind10.isc.org/svn/bind10/branches/parkinglot@517 e5f2f494-b856-4b98-b285-d166d9295462
Jelte Jansen 15 years ago
parent
commit
c6233a9430
2 changed files with 0 additions and 60 deletions
  1. 0 3
      src/lib/cc/cpp/Makefile.am
  2. 0 57
      src/lib/cc/cpp/test.cc

+ 0 - 3
src/lib/cc/cpp/Makefile.am

@@ -1,8 +1,5 @@
 AM_CPPFLAGS = -I$(top_srcdir)/src/lib/cc/cpp -I$(top_srcdir)/ext -Wall -Werror
 
-bin_PROGRAMS = test
-test_SOURCES = test.cc
-test_LDADD = libcc.a
 lib_LIBRARIES = libcc.a
 libcc_a_SOURCES = data.cc data.h data_def.h data_def.cc session.cc session.h
 

+ 0 - 57
src/lib/cc/cpp/test.cc

@@ -1,57 +0,0 @@
-
-#include "data.h"
-#include "data_def.h"
-
-#include <fstream>
-
-using namespace std;
-using namespace isc::data;
-
-int
-main(int argc, char **argv) {
-    std::ifstream file;
-    std::stringstream ss;
-    DataDefinition def;
-    ElementPtr data;
-
-    file.open("parkinglot.spec");
-    if (!file) {
-        cout << "error opening parkinglot.spec" << endl;
-        return 1;
-    }
-
-    try {
-        def = DataDefinition(file);
-        cout << "Definition: " << endl;
-        cout << def.getDefinition() << endl;
-    } catch (ParseError pe) {
-        cout << "Error parsing definition file: " << pe.what() << endl;
-        return 1;
-    } catch (DataDefinitionError dde) {
-        cout << "Error reading definition file: " << dde.what() << endl;
-        return 1;
-    }
-    file.close();
-
-    file.open("parkinglot.data");
-    if (!file) {
-        cout << "error opening parkinglot.data" << endl;
-        return 1;
-    }
-    try {
-        data = Element::createFromString(file);
-        cout << "Data: " << endl;
-        cout << data << endl;
-    } catch (ParseError pe) {
-        cout << "Error parsing data file: " << pe.what() << endl;
-        return 1;
-    }
-
-    if (def.validate(data)) {
-        cout << "Data validated" << endl;
-        cout << data << endl;
-    } else {
-        cout << "Error in data validation" << endl;
-    }
-    file.close();
-}