}
-XBT_TEST_UNIT("synchronized int", test_dynar_sync_int,
- "Synchronized dynars of integers")
+XBT_TEST_UNIT("synchronized int", test_dynar_sync_int,"Synchronized dynars of integers")
{
/* Vars_decl [doxygen cruft] */
xbt_dynar_t d;
xbt_dynar_free(&d);
XBT_TEST_SUITE("xbt_str", "String Handling");
-XBT_TEST_UNIT("xbt_str_split_quoted", test_split_quoted,
- "test the function xbt_str_split_quoted")
+XBT_TEST_UNIT("xbt_str_split_quoted", test_split_quoted,"test the function xbt_str_split_quoted")
{
xbt_dynar_t d;
char *s;
free(s); \
xbt_dynar_free(&d);
-XBT_TEST_UNIT("xbt_str_split_str", test_split_str,
- "test the function xbt_str_split_str")
+XBT_TEST_UNIT("xbt_str_split_str", test_split_str,"test the function xbt_str_split_str")
{
xbt_dynar_t d;
char *s;
}
XBT_TEST_SUITE("xbt_strbuff", "String Buffers");
-XBT_TEST_UNIT("xbt_strbuff_substitute", test_strbuff_substitute,
- "test the function xbt_strbuff_substitute")
+XBT_TEST_UNIT("xbt_strbuff_substitute", test_strbuff_substitute,"test the function xbt_strbuff_substitute")
{
xbt_test_add0("Empty");
mytest("", "", "");
next
}
- if (m/XBT_TEST_SUITE\(\w*"([^"]*)"\w*,(.*?)\);/) { #" {
+ if (m/XBT_TEST_SUITE\(\w*"([^"]*)"\w*, *(.*?)\);/) { #" {
die "$progname: Multiple suites in the same file ($infile) are not supported yet\n" if length($suite_name);
($suite_name,$suite_title)=($1,$2);
+ die "$progname: Empty suite name in $infile" unless length($suite_name);
+ die "$progname: Empty suite title in $infile" unless length($suite_title);
next;
- }
+ } elsif (m/XBT_TEST_SUITE/) {
+ die "$progname: Parse error: This line seem to be a test suite declaration, but failed to parse it\n$_\n";
+ }
if (m/XBT_TEST_UNIT\(\w*"([^"]*)"\w*,([^,]*),(.*?)\)/) { #"{
die "$progname: multiply defined unit in file $infile: $1\n" if (defined($tests{$1}));
-
+
my @t=($1,$2,$3);
push @tests,\@t;
$tests{$1} = 1;
+ } elsif (m/XBT_TEST_UNIT/) {
+ die "$progname: Parse error: This line seem to be a test unit, but failed to parse it\n$_\n";
}
$unit_source .= $_ if $takeit;
}