aboutsummaryrefslogtreecommitdiff
path: root/tests/cxx/serializer/built-in
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2009-10-20 10:50:22 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2009-10-20 10:50:22 +0200
commitb135374d5e40df21871b3e0c9efc69ba2d8361cb (patch)
tree0f53bf8253ff16b7ce176f47b56e4ac879a768c6 /tests/cxx/serializer/built-in
parent54ed525e5b8680e8737b7750fd73458d9ef1d30c (diff)
Add tests to the distribution
The distribution makefiles for tests are automatically generated by the build/dist script. nmakefiles are not yet generated.
Diffstat (limited to 'tests/cxx/serializer/built-in')
-rw-r--r--tests/cxx/serializer/built-in/driver.cxx18
-rw-r--r--tests/cxx/serializer/built-in/makefile21
-rw-r--r--tests/cxx/serializer/built-in/test-000.xml1
-rw-r--r--tests/cxx/serializer/built-in/test-001.xml1
4 files changed, 38 insertions, 3 deletions
diff --git a/tests/cxx/serializer/built-in/driver.cxx b/tests/cxx/serializer/built-in/driver.cxx
index 453fd29..9798659 100644
--- a/tests/cxx/serializer/built-in/driver.cxx
+++ b/tests/cxx/serializer/built-in/driver.cxx
@@ -969,6 +969,8 @@ struct root_simpl: root_sskel
case 2:
return gday (15, 0, 0);
}
+
+ return gday (0);
}
virtual bool
@@ -989,6 +991,8 @@ struct root_simpl: root_sskel
case 1:
return gmonth (12, 2, 30);
}
+
+ return gmonth (0);
}
virtual bool
@@ -1009,6 +1013,8 @@ struct root_simpl: root_sskel
case 1:
return gyear (-2007, -2, -30);
}
+
+ return gyear (0);
}
virtual bool
@@ -1029,6 +1035,8 @@ struct root_simpl: root_sskel
case 1:
return gmonth_day (12, 31, 2, 30);
}
+
+ return gmonth_day (0, 0);
}
virtual bool
@@ -1049,6 +1057,8 @@ struct root_simpl: root_sskel
case 1:
return gyear_month (-2007, 12, -2, -30);
}
+
+ return gyear_month (0, 0);
}
virtual bool
@@ -1069,6 +1079,8 @@ struct root_simpl: root_sskel
case 1:
return date (-2007, 12, 31, -2, -30);
}
+
+ return date (0, 0, 0);
}
virtual bool
@@ -1089,6 +1101,8 @@ struct root_simpl: root_sskel
case 1:
return time (23, 59, 59.55, 2, 30);
}
+
+ return time (0, 0, 0);
}
virtual bool
@@ -1109,6 +1123,8 @@ struct root_simpl: root_sskel
case 1:
return date_time (-2007, 12, 31, 23, 59, 59.55, -2, -30);
}
+
+ return date_time (0, 0, 0, 0, 0, 0);
}
virtual bool
@@ -1139,6 +1155,8 @@ struct root_simpl: root_sskel
case 6:
return duration (false, 1, 2, 3, 4, 5, 6.7);
}
+
+ return duration (false, 0, 0, 0, 0, 0, 0);
}
private:
diff --git a/tests/cxx/serializer/built-in/makefile b/tests/cxx/serializer/built-in/makefile
index c0f3c84..5029c5c 100644
--- a/tests/cxx/serializer/built-in/makefile
+++ b/tests/cxx/serializer/built-in/makefile
@@ -16,9 +16,11 @@ dep := $(obj:.o=.o.d)
xsde.l := $(out_root)/libxsde/xsde/xsde.l
xsde.l.cpp-options := $(out_root)/libxsde/xsde/xsde.l.cpp-options
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
+driver := $(out_base)/driver
+test := $(out_base)/.test
+dist := $(out_base)/.dist
+dist-win := $(out_base)/.dist-win
+clean := $(out_base)/.clean
# Build.
@@ -32,6 +34,7 @@ skel := $(addprefix $(out_base)/,$(skelf))
$(skel): xsde := $(out_root)/xsde/xsde
$(skel): $(out_root)/xsde/xsde
+$(skel) $(dist) $(dist-win): xsde_options +=
$(call include-dep,$(dep))
@@ -55,6 +58,18 @@ $(out_base)/.test-%: $(driver) $(src_base)/test.xsd $(src_base)/test-%.std
$(call message,test $(out_base)/$*,$(driver) $(src_base)/test-$*.xml | diff -u $(src_base)/test-$*.std -)
+# Dist.
+#
+$(dist) $(dist-win): opt := -src $(src_base) -cmd cxx-serializer -xsd "$(xsd)" \
+-cxx "$(cxx)" -gen "$(skelf)" -opt "$(xsde_options)" -out $(dist_prefix)
+
+$(dist):
+ $(call message,install $(src_base),$(scf_root)/dist $(opt))
+
+$(dist-win):
+ $(call message,install $(src_base),$(scf_root)/dist -win $(opt))
+
+
# Clean.
#
$(clean): $(driver).o.clean \
diff --git a/tests/cxx/serializer/built-in/test-000.xml b/tests/cxx/serializer/built-in/test-000.xml
new file mode 100644
index 0000000..421376d
--- /dev/null
+++ b/tests/cxx/serializer/built-in/test-000.xml
@@ -0,0 +1 @@
+dummy
diff --git a/tests/cxx/serializer/built-in/test-001.xml b/tests/cxx/serializer/built-in/test-001.xml
new file mode 100644
index 0000000..421376d
--- /dev/null
+++ b/tests/cxx/serializer/built-in/test-001.xml
@@ -0,0 +1 @@
+dummy