summaryrefslogtreecommitdiff
path: root/odb-tests/oracle/database
diff options
context:
space:
mode:
Diffstat (limited to 'odb-tests/oracle/database')
-rw-r--r--odb-tests/oracle/database/buildfile14
-rw-r--r--odb-tests/oracle/database/driver.cxx33
-rw-r--r--odb-tests/oracle/database/testscript9
3 files changed, 56 insertions, 0 deletions
diff --git a/odb-tests/oracle/database/buildfile b/odb-tests/oracle/database/buildfile
new file mode 100644
index 0000000..59b025d
--- /dev/null
+++ b/odb-tests/oracle/database/buildfile
@@ -0,0 +1,14 @@
+# file : oracle/database/buildfile
+# license : GNU GPL v2; see accompanying LICENSE file
+
+if ($build.meta_operation != 'dist')
+{
+ assert ($oracle) "oracle should be configured for this test"
+ assert (!$multi) "multi-database mode is not supported by this test"
+}
+
+import libs = libodb-oracle%lib{odb-oracle}
+
+exe{driver}: {hxx cxx}{*} $libs testscript
+
+cxx.poptions =+ "-I$out_base" "-I$src_base"
diff --git a/odb-tests/oracle/database/driver.cxx b/odb-tests/oracle/database/driver.cxx
new file mode 100644
index 0000000..499f136
--- /dev/null
+++ b/odb-tests/oracle/database/driver.cxx
@@ -0,0 +1,33 @@
+// file : oracle/database/driver.cxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+// Test that database constructors are unambiguous (compilation only).
+//
+
+#include <odb/oracle/database.hxx>
+
+namespace oracle = odb::oracle;
+using namespace oracle;
+
+int
+main (int argc, char* argv[])
+{
+ // This code should not execute.
+ //
+ if (argc != 0)
+ return 0;
+
+ {
+ database d1 ("bob", "secret", "db1");
+ }
+
+ {
+ database d1 ("bob", "secret", "svc1", "server1");
+ database d2 ("bob", "secret", "svc1", "server1", 999);
+ }
+
+ {
+ database d1 (argc, argv);
+ database d2 (argc, argv, false);
+ }
+}
diff --git a/odb-tests/oracle/database/testscript b/odb-tests/oracle/database/testscript
new file mode 100644
index 0000000..d2b8281
--- /dev/null
+++ b/odb-tests/oracle/database/testscript
@@ -0,0 +1,9 @@
+# file : oracle/database/testscript
+# license : GNU GPL v2; see accompanying LICENSE file
+
+.include ../../database-options.testscript
+.include ../../oracle.testscript
+
+: basics
+:
+$*