Add tests.
[genetic.git] / tests / gene / create.cpp
diff --git a/tests/gene/create.cpp b/tests/gene/create.cpp
new file mode 100644 (file)
index 0000000..9bc970e
--- /dev/null
@@ -0,0 +1,21 @@
+#include <iostream>
+
+#include "gene.h"
+
+using namespace std;
+using namespace genetic;
+
+int main() {
+    typedef Gene<int> _Gene;
+
+    _Gene gene(1);
+
+    if (gene.get() != 1) {
+        cout << "Gene does not contained initial value\n";
+        return 1;
+    }
+
+    cout << "Gene contained initial value\n";
+    return 0;
+}
+