summaryrefslogtreecommitdiff
path: root/core/test_scalar.cpp
diff options
context:
space:
mode:
authorJan Huwald <jh@sotun.de>2012-05-07 20:01:51 (GMT)
committerJan Huwald <jh@sotun.de>2012-05-07 20:01:51 (GMT)
commit420d2ef464d4a741028e132e662d5626806a41f5 (patch)
tree1aca6eb512e4ed0fb5f3c10c528cb998b6ffd695 /core/test_scalar.cpp
Initial commitHEADmaster
Diffstat (limited to 'core/test_scalar.cpp')
-rw-r--r--core/test_scalar.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/core/test_scalar.cpp b/core/test_scalar.cpp
new file mode 100644
index 0000000..3c57266
--- /dev/null
+++ b/core/test_scalar.cpp
@@ -0,0 +1,23 @@
+#include "stdio.h"
+
+#include "scalar.hpp"
+#include "mempool.hpp"
+
+int main() {
+ Scalar<int> eins("eins"), zwei("zwei");
+ Scalar<uint8_t, 1> bit1("bit");
+
+ eins() = 1;
+ zwei() = 2 * eins();
+ bit1.set(1);
+
+ int result = bit1() * eins() * zwei();
+
+ fprintf(stderr, "bit mul result = %d", result);
+
+ if (result == 2) {
+ return 0;
+ }else{
+ return -1;
+ }
+}
contact: Jan Huwald // Impressum