Fix up scripts, fix generated enum value for strong mode, regenerate files (#6389)

* Fix up scripts, fix generated enum value for strong mode, regenerate files

* missing files

* GH action

* remove action
This commit is contained in:
Dan Field
2021-01-07 14:51:52 -08:00
committed by GitHub
parent 41253e574e
commit 809fe49c7a
9 changed files with 58 additions and 31 deletions

View File

@@ -16,7 +16,6 @@
pushd "$(dirname $0)" >/dev/null
command -v pub >/dev/null 2>&1 || { echo >&2 "Dart tests require `pub` but it's not installed. Aborting."; exit 1; }
command -v dart >/dev/null 2>&1 || { echo >&2 "Dart tests require dart to be in path but it's not installed. Aborting."; exit 1; }
# output required files to the dart folder so that pub will be able to
# distribute them and more people can more easily run the dart tests
@@ -26,7 +25,7 @@ cp monsterdata_test.mon ../dart/test
cd ../dart
# update packages
pub get
dart pub get
# Execute the sample.
dart test/flat_buffers_test.dart

View File

@@ -32,7 +32,7 @@ class Color {
/// \brief color Blue (1u << 3)
static const Color Blue = const Color._(8);
static const values = {1: Red,2: Green,8: Blue,};
static const Map<int,Color> values = {1: Red,2: Green,8: Blue,};
static const fb.Reader<Color> reader = const _ColorReader();
@@ -73,7 +73,7 @@ class Race {
static const Race Human = const Race._(0);
static const Race Dwarf = const Race._(1);
static const Race Elf = const Race._(2);
static const values = {-1: None,0: Human,1: Dwarf,2: Elf,};
static const Map<int,Race> values = {-1: None,0: Human,1: Dwarf,2: Elf,};
static const fb.Reader<Race> reader = const _RaceReader();
@@ -114,7 +114,7 @@ class AnyTypeId {
static const AnyTypeId Monster = const AnyTypeId._(1);
static const AnyTypeId TestSimpleTableWithEnum = const AnyTypeId._(2);
static const AnyTypeId MyGame_Example2_Monster = const AnyTypeId._(3);
static const values = {0: NONE,1: Monster,2: TestSimpleTableWithEnum,3: MyGame_Example2_Monster,};
static const Map<int,AnyTypeId> values = {0: NONE,1: Monster,2: TestSimpleTableWithEnum,3: MyGame_Example2_Monster,};
static const fb.Reader<AnyTypeId> reader = const _AnyTypeIdReader();
@@ -155,7 +155,7 @@ class AnyUniqueAliasesTypeId {
static const AnyUniqueAliasesTypeId M = const AnyUniqueAliasesTypeId._(1);
static const AnyUniqueAliasesTypeId TS = const AnyUniqueAliasesTypeId._(2);
static const AnyUniqueAliasesTypeId M2 = const AnyUniqueAliasesTypeId._(3);
static const values = {0: NONE,1: M,2: TS,3: M2,};
static const Map<int,AnyUniqueAliasesTypeId> values = {0: NONE,1: M,2: TS,3: M2,};
static const fb.Reader<AnyUniqueAliasesTypeId> reader = const _AnyUniqueAliasesTypeIdReader();
@@ -196,7 +196,7 @@ class AnyAmbiguousAliasesTypeId {
static const AnyAmbiguousAliasesTypeId M1 = const AnyAmbiguousAliasesTypeId._(1);
static const AnyAmbiguousAliasesTypeId M2 = const AnyAmbiguousAliasesTypeId._(2);
static const AnyAmbiguousAliasesTypeId M3 = const AnyAmbiguousAliasesTypeId._(3);
static const values = {0: NONE,1: M1,2: M2,3: M3,};
static const Map<int,AnyAmbiguousAliasesTypeId> values = {0: NONE,1: M1,2: M2,3: M3,};
static const fb.Reader<AnyAmbiguousAliasesTypeId> reader = const _AnyAmbiguousAliasesTypeIdReader();

View File

@@ -26,7 +26,7 @@ class EnumInNestedNS {
static const EnumInNestedNS A = const EnumInNestedNS._(0);
static const EnumInNestedNS B = const EnumInNestedNS._(1);
static const EnumInNestedNS C = const EnumInNestedNS._(2);
static const values = {0: A,1: B,2: C,};
static const Map<int,EnumInNestedNS> values = {0: A,1: B,2: C,};
static const fb.Reader<EnumInNestedNS> reader = const _EnumInNestedNSReader();