Makefile added / pkg-config descriptor
[metux-java.git] / tests / _test_dbobjects.java
blob2ef5a00adcaa3b965559e9adfd4cd2da9cbb8cda
2 import org.de.metux.util.*;
3 import org.de.metux.dbObjects.*;
5 public class _unit_test
7 public static void main(String[] args) {}
9 /*
10 public class _unit_test extends Tester
12 public static void main(String[] args)
14 if (
15 test_str_replace() &&
16 test_sql_int() &&
17 test_sql_text1() &&
18 test_sql_text2() &&
19 test_sql_text3()
21 System.exit(0);
23 System.exit(0);
26 / * test imported str_replace() function - just in case the compiler
27 makes trouble (gcj seems to have some bugs when linking against
28 several .JAR's * /
29 public static boolean test_str_replace()
31 return runTestStr
33 "StrReplace",
34 "hello world 123 huh",
35 StrReplace.replace("<XXX>", "123", "hello world <XXX> huh" )
39 public static boolean test_sql_int()
41 return runTestStr
43 "sql_int",
44 "1234",
45 new Int ( 1234 ).toSQL()
49 public static boolean test_sql_text1()
51 return runTestStr
53 "sql_text1",
54 "'hello world'",
55 new Text ( "hello world" ).toSQL()
59 public static boolean test_sql_text2()
61 return runTestStr
63 "sql_text2",
64 "'\\'hello world\\''",
65 new Text ( "'hello world'" ).toSQL()
69 public static boolean test_sql_text3()
71 return runTestStr
73 "sql_text3\\",
74 "'\\'hello world\\\\'",
75 new Text ( "'hello world\\" ).toSQL()