mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-19 13:23:05 +00:00
[C++] Adds basic schema evolution tests (#5611)
* Added basic schema evolution tests * Add BUILD targets for evolution tests. Added to test/generate_code scripts * Use vector.front() instead of vector.data() * Added --scoped-enums option for evolution test
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
adbcbba5d1
commit
dda095023d
39
tests/evolution_test/evolution_v1.fbs
Normal file
39
tests/evolution_test/evolution_v1.fbs
Normal file
@@ -0,0 +1,39 @@
|
||||
namespace Evolution.V1;
|
||||
|
||||
table TableA {
|
||||
a:float;
|
||||
b:int;
|
||||
}
|
||||
|
||||
table TableB {
|
||||
a:int;
|
||||
}
|
||||
|
||||
enum Enum : byte {
|
||||
King,
|
||||
Queen
|
||||
}
|
||||
|
||||
union Union {
|
||||
TableA,
|
||||
TableB
|
||||
}
|
||||
|
||||
struct Struct {
|
||||
a:int;
|
||||
b:double;
|
||||
}
|
||||
|
||||
table Root {
|
||||
a:int;
|
||||
b:bool;
|
||||
c:Union;
|
||||
d:Enum;
|
||||
e:TableA;
|
||||
f:Struct;
|
||||
g:[int];
|
||||
h:[TableB];
|
||||
i:int = 1234;
|
||||
}
|
||||
|
||||
root_type Root;
|
||||
Reference in New Issue
Block a user