make code look better
[cdsspec-compiler.git] / test.cc
diff --git a/test.cc b/test.cc
index c7cb0db..56bc554 100644 (file)
--- a/test.cc
+++ b/test.cc
@@ -1,81 +1,3 @@
-#include <stdio.h>
-#include <iostream>
-#include <vector>
-
-using namespace std;
-
-
-template<typename T>
-class A {
-       private:
-       int outer;
-       class B {
-               private:
-                       vector<int> v;
-                       T str;
-               public:
-                       typedef struct C {
-                               T x;
-                       } C_t;
-
-                       enum interface_t {put, get};
-                       B() {
-                               v = vector<int>();
-                               str = "abc";
-
-                       }
-
-                       void _pushBack(int a) {
-                               cout << str << endl;
-                               v.push_back(a);
-                       }
-
-                       int _size() {
-                               return v.size();
-                       }
-
-                       C_t func() {
-                               char *cStr = "struct_ab";
-                               C_t c;
-                               c.x = cStr;
-                               return c;
-                       }
-       } b;
-
-       public:
-       A() {
-       }
-       
-       void pushBack(int a) {
-               //printf("Size: %d\n", b.size());
-               b._pushBack(a);
-               //printf("Size: %d\n", b.size());
-       }
-
-       int size() {
-               //B<T>::interface_t inter;
-               struct B::C_t c = b.func();
-               enum B::interface_t a = B::put;
-               vector<enum B::interface_t> ve(3);
-               ve.push_back(B::put);
-               cout << "Size: " << ve.size() << endl;
-               cout << b.func().x << endl;
-               return b._size();
-       }
-};
-
-int main() {
-       #define __COND_SAT__ a.size()
-       A<string> a;
-       a.pushBack(1);
-       if (__COND_SAT__ != 0) {
-               cout << "Size greater than 0" << endl;
-       }
-       #undef __COND_SAT__
-
-       bool __COND_SAT__ = false;
-       if (!__COND_SAT__) {
-               cout << "False!" << endl;
-       }
-       return 0;
+extern int test() {
+       return 10;
 }
 }