blob: cb0442d45e335ac5d1b711636e5e2531af69a63d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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");
}
}
}
|