summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCsaba Hruska <csaba.hruska@gmail.com>2015-12-21 13:48:22 +0100
committerCsaba Hruska <csaba.hruska@gmail.com>2015-12-21 13:48:22 +0100
commitbefc5afb22b36d744c403d103d591c5d190d394f (patch)
tree05e390bef55b0662a9a919b886322b66b113ff21 /test
parentdc8e31235fccbe5ea54d94b0ca69e005ca88c7ea (diff)
add lambdacube-ir haskell lib
Diffstat (limited to 'test')
-rw-r--r--test/idCpp.cpp31
-rw-r--r--test/idHs.hs8
2 files changed, 0 insertions, 39 deletions
diff --git a/test/idCpp.cpp b/test/idCpp.cpp
deleted file mode 100644
index 24894f4..0000000
--- a/test/idCpp.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
1#include <string>
2#include <iostream>
3#include <istream>
4#include <ostream>
5#include <iterator>
6
7#include "Mesh.hpp"
8#include "IR.hpp"
9#include "TypeInfo.hpp"
10
11int main() {
12 // don't skip the whitespace while reading
13 std::cin >> std::noskipws;
14
15 // use stream iterators to copy the stream to a string
16 std::istream_iterator<char> it(std::cin);
17 std::istream_iterator<char> end;
18 std::string results(it, end);
19
20 try {
21 json jobjIn = json::parse(results);
22 std::shared_ptr<Pipeline> b = fromJSON(W<std::shared_ptr<Pipeline>>(),jobjIn);
23 std::shared_ptr<data::Pipeline> tv = std::static_pointer_cast<data::Pipeline>(b);
24 json jobjOut = toJSON(b);
25 std::cout << jobjOut;
26 } catch (std::string e) {
27 std::cout << "exception: " << e << "\n";
28 } catch (...) { std::cout << "default exception\n"; }
29
30 return 0;
31}
diff --git a/test/idHs.hs b/test/idHs.hs
deleted file mode 100644
index 7cd9917..0000000
--- a/test/idHs.hs
+++ /dev/null
@@ -1,8 +0,0 @@
1{-# LANGUAGE ScopedTypeVariables #-}
2import qualified Data.ByteString.Lazy as B
3import Data.Aeson
4import IR
5
6main = do
7 Just (p :: Pipeline) <- decode <$> B.getContents
8 B.putStr $ encode p