about summary refs log tree commit diff homepage
path: root/test/CXX/Trivial.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CXX/Trivial.cpp')
-rw-r--r--test/CXX/Trivial.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/CXX/Trivial.cpp b/test/CXX/Trivial.cpp
new file mode 100644
index 00000000..b50e82b2
--- /dev/null
+++ b/test/CXX/Trivial.cpp
@@ -0,0 +1,22 @@
+// RUN: %llvmgxx %s --emit-llvm -O0 -c -o %t1.bc
+// RUN: %klee --no-output --exit-on-error %t1.bc
+
+#include <cassert>
+
+class Test {
+  int x;
+
+public:
+  Test(int _x) : x(_x) {}
+  ~Test() {}
+
+  int getX() { return x; }
+};
+
+int main() {
+  Test rt(2);
+  
+  assert(rt.getX()==2);
+
+  return 0;
+}