From ab08676c3765272490a0c4cf41e6559e2427d9c9 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Mon, 8 Feb 2021 11:49:56 -0800 Subject: [PATCH] Fix namespace examples in unit tests --- packages/adl/test/test-parser.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/adl/test/test-parser.ts b/packages/adl/test/test-parser.ts index 431c43f38..ae42dad49 100644 --- a/packages/adl/test/test-parser.ts +++ b/packages/adl/test/test-parser.ts @@ -98,7 +98,7 @@ describe('syntax', () => { describe('tuple model expressions', () => { parseEach([ - 'namespace A { b(param: [number, string]): [1, "hi"] }' + 'namespace A { op b(param: [number, string]): [1, "hi"] }' ]); }); @@ -139,13 +139,13 @@ describe('syntax', () => { describe('namespace statements', () => { parseEach([ 'namespace Store {}', - 'namespace Store { read(): int32 }', - 'namespace Store { read(): int32, write(v: int32): {} }', - 'namespace Store { read(): int32; write(v: int32): {} }', - '@foo namespace Store { @dec read():number, @dec write(n: number): {} }', - '@foo @bar namespace Store { @foo @bar read(): number; }', + 'namespace Store { op read(): int32 }', + 'namespace Store { op read(): int32, op write(v: int32): {} }', + 'namespace Store { op read(): int32; op write(v: int32): {} }', + '@foo namespace Store { @dec op read():number, @dec op write(n: number): {} }', + '@foo @bar namespace Store { @foo @bar op read(): number; }', 'namespace Store(apiKey: string, otherArg: number) { }', - 'namespace Store(... apiKeys, x: string) { foo(... A, b: string, ...C, d: number): void }' + 'namespace Store(... apiKeys, x: string) { op foo(... A, b: string, ...C, d: number): void }' ]); }); @@ -156,7 +156,7 @@ describe('syntax', () => { model C = A; ; namespace I { - foo(): number; + op foo(): number; } namespace J {