diff options
author | randomdan <randomdan@localhost> | 2014-05-29 13:01:20 +0000 |
---|---|---|
committer | randomdan <randomdan@localhost> | 2014-05-29 13:01:20 +0000 |
commit | 9d120ddf918bbdd93e302c1604a9915411bc0db6 (patch) | |
tree | c462d89f72e144f4c9c6a223da640006285f1aaf /slicer/test | |
parent | Fix slice scanner and split .ice files back into logical blocks (diff) | |
download | slicer-9d120ddf918bbdd93e302c1604a9915411bc0db6.tar.bz2 slicer-9d120ddf918bbdd93e302c1604a9915411bc0db6.tar.xz slicer-9d120ddf918bbdd93e302c1604a9915411bc0db6.zip |
First hash of slicer, works well for the golden path, beyond that is uncharted territory
Diffstat (limited to 'slicer/test')
-rw-r--r-- | slicer/test/Jamfile.jam | 3 | ||||
-rw-r--r-- | slicer/test/do-slicer.cpp | 13 | ||||
-rw-r--r-- | slicer/test/types.ice | 38 |
3 files changed, 54 insertions, 0 deletions
diff --git a/slicer/test/Jamfile.jam b/slicer/test/Jamfile.jam new file mode 100644 index 0000000..b4e05b3 --- /dev/null +++ b/slicer/test/Jamfile.jam @@ -0,0 +1,3 @@ +import testing ; + +run do-slicer.cpp ../slicer//slicer : : types.ice ; diff --git a/slicer/test/do-slicer.cpp b/slicer/test/do-slicer.cpp new file mode 100644 index 0000000..8b03a7d --- /dev/null +++ b/slicer/test/do-slicer.cpp @@ -0,0 +1,13 @@ +#include <slicer/parser.h> +#include <boost/filesystem/convenience.hpp> +#include <boost/filesystem/operations.hpp> + +int +main(int, char ** argv) +{ + const boost::filesystem::path slice = argv[1]; + Slicer::Slicer::Apply(slice, "/dev/null"); + + return 0; +} + diff --git a/slicer/test/types.ice b/slicer/test/types.ice new file mode 100644 index 0000000..fdacb2d --- /dev/null +++ b/slicer/test/types.ice @@ -0,0 +1,38 @@ +module TestModule { + class BuiltIns { + bool mbool; + byte mbyte; + short mshort; + int mint; + long mlong; + float mfloat; + double mdouble; + string mstring; + }; + class ClassType { + int a; + int b; + }; + struct StructType { + int a; + int b; + }; + class Optionals { + optional(1) int simple; + optional(2) StructType str; + }; + sequence<ClassType> Classes; + sequence<StructType> Structs; + dictionary<int, ClassType> ClassMap; + dictionary<int, StructType> StructMap; + class ClassClass { + ClassType cls; + StructType str; + int simp; + }; + struct StructStruct { + ClassType cls; + StructType str; + int simp; + }; +}; |