diff options
author | Claudius "keldu" Holeksa <mail@keldu.de> | 2024-03-23 17:48:09 +0100 |
---|---|---|
committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2024-03-23 17:48:09 +0100 |
commit | c64c76e273084cfd5b8628fb268e803957fc3025 (patch) | |
tree | ebbc9bfa647617ba5c3c7c226f051a2933ccc3a5 /modules/codec/tests/forst.cpp | |
parent | 7d096b9b3057617475d223330aaa6b321e0bd59a (diff) |
codec, io_codec: forst and rpc work
Diffstat (limited to 'modules/codec/tests/forst.cpp')
-rw-r--r-- | modules/codec/tests/forst.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/modules/codec/tests/forst.cpp b/modules/codec/tests/forst.cpp new file mode 100644 index 0000000..cb0442d --- /dev/null +++ b/modules/codec/tests/forst.cpp @@ -0,0 +1,29 @@ +#include <forstio/test/suite.hpp> +#include "../c++/data.hpp" +#include "../c++/forst.hpp" + +#include <iostream> + +namespace { +namespace schema { +using namespace saw::schema; + +using TestStruct = Struct< + Member<String, "string">, + Member<UInt64, "number">, + Member<Int8, "signed"> +>; + +using TestArray = Array< + TestStruct +>; + +SAW_TEST("Codec Forst Info"){ + using namespace saw; + + SAW_EXPECT(impl::forst_codec_info<schema::UInt64>::layers == 0, "Layer info is wrong"); + SAW_EXPECT(impl::forst_codec_info<TestStruct>::layers == 1, "Layer info is wrong"); + SAW_EXPECT(impl::forst_codec_info<TestArray>::layers == 2, "Layer info is wrong"); +} +} +} |