dart: use enhanced enums (#8313)

* dart: rename enums.fbs

* feat: use dart enhanced enums

* generate code

---------

Co-authored-by: Wouter van Oortmerssen <aardappel@gmail.com>
This commit is contained in:
Ivan Dlugos
2024-11-18 18:31:19 +01:00
committed by GitHub
parent 5f453ef738
commit a9df44828d
19 changed files with 297 additions and 512 deletions

View File

@@ -1,4 +1,5 @@
#!/bin/sh
set -euo pipefail
#
# Copyright 2016 Google Inc. All rights reserved.
#
@@ -16,7 +17,10 @@
pushd "$(dirname $0)" >/dev/null
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; }
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
../flatc --dart --gen-object-api -I include_test -o ../dart/test monster_test.fbs
@@ -28,7 +32,7 @@ cp monster_test.fbs ../dart/test
cd ../dart
../flatc --dart --gen-object-api -o ./test ./test/list_of_enums.fbs
../flatc --dart --gen-object-api -o ./test ./test/enums.fbs
../flatc --dart --gen-object-api -o ./test ./test/bool_structs.fbs
# update packages