diff options
author | aardappel <aardappel@gmail.com> | 2019-05-22 11:48:10 -0700 |
---|---|---|
committer | aardappel <aardappel@gmail.com> | 2019-05-22 11:48:10 -0700 |
commit | 30ac512a540249e1e716000b970283ac24807073 (patch) | |
tree | 95cea2110e8d4474fee9ffd7b8261c38aded47c5 /tests/lobstertest.lobster | |
parent | b04736f9bd88af2a10f48a2ca3bd25a0e42d5150 (diff) | |
download | flatbuffers-30ac512a540249e1e716000b970283ac24807073.tar.gz flatbuffers-30ac512a540249e1e716000b970283ac24807073.tar.bz2 flatbuffers-30ac512a540249e1e716000b970283ac24807073.zip |
Fixed Lobster implementation to work with latest language features
Diffstat (limited to 'tests/lobstertest.lobster')
-rw-r--r-- | tests/lobstertest.lobster | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/lobstertest.lobster b/tests/lobstertest.lobster index e4f08087..aae0be16 100644 --- a/tests/lobstertest.lobster +++ b/tests/lobstertest.lobster @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -include from "../lobster/" -include "monster_test_generated.lobster" +import from "../lobster/" +import monster_test_generated def check_read_buffer(buf): // CheckReadBuffer checks that the given buffer is evaluated correctly as the example Monster. @@ -119,14 +119,14 @@ check_read_buffer(fb1) write_file("monsterdata_lobster_wire.mon", fb1) // Test converting the buffer to JSON and parsing the JSON back again. -schema := read_file("monster_test.fbs") +let schema = read_file("monster_test.fbs") assert schema -includedirs := [ "include_test" ] +let includedirs = [ "include_test" ] // Convert binary to JSON: -json, err1 := flatbuffers_binary_to_json(schema, fb1, includedirs) +let json, err1 = flatbuffers_binary_to_json(schema, fb1, includedirs) assert not err1 // Parse JSON back to binary: -fb3, err2 := flatbuffers_json_to_binary(schema, json, includedirs) +let fb3, err2 = flatbuffers_json_to_binary(schema, json, includedirs) assert not err2 // Check the resulting binary again (full roundtrip test): check_read_buffer(fb3) |