diff --git a/test/run-drun/composite-query.mo b/test/run-drun/composite-query.mo index 30695acad59..1aa83a93a11 100644 --- a/test/run-drun/composite-query.mo +++ b/test/run-drun/composite-query.mo @@ -16,6 +16,7 @@ actor Composites { }; public composite query func cq1() : async () { + assert 0 : Nat64 == Prim.replyDeadline(); }; public composite query func cq2() : async () { diff --git a/test/run-drun/ok/composite-query.tc.ok b/test/run-drun/ok/composite-query.tc.ok index 771ebcfc7fb..a312e5e19e8 100644 --- a/test/run-drun/ok/composite-query.tc.ok +++ b/test/run-drun/ok/composite-query.tc.ok @@ -1,8 +1,8 @@ -composite-query.mo:30.11-30.13: warning [M0145], this pattern of type +composite-query.mo:31.11-31.13: warning [M0145], this pattern of type ?Class__1 does not cover value null -composite-query.mo:35.11-35.13: warning [M0145], this pattern of type +composite-query.mo:36.11-36.13: warning [M0145], this pattern of type ?Class__1 does not cover value null diff --git a/test/run-drun/ok/query2.drun-run.ok b/test/run-drun/ok/query2.drun-run.ok index 1b61d1b7efb..31772142fbb 100644 --- a/test/run-drun/ok/query2.drun-run.ok +++ b/test/run-drun/ok/query2.drun-run.ok @@ -3,4 +3,12 @@ ingress Completed: Reply: 0x4449444c0000 debug.print: 2 debug.print: 3 debug.print: 4 -ingress Completed: Reject: IC0504: Error from Canister rwlgt-iiaaa-aaaaa-aaaaa-cai: Canister violated contract: ic0::msg_deadline is not enabled. +debug.print: 4 +debug.print: In read: +debug.print: 5 +debug.print: 4 +debug.print: In read: +debug.print: 5 +debug.print: 4 +debug.print: The following fails in the interpreter, for lack of query semantics +ingress Completed: Reply: 0x4449444c0000 diff --git a/test/run-drun/query2.mo b/test/run-drun/query2.mo index 066162b6cf8..34d097d3b74 100644 --- a/test/run-drun/query2.mo +++ b/test/run-drun/query2.mo @@ -6,14 +6,14 @@ actor counter = { Prim.debugPrintNat c; }; public func printCounter () : async () { - assert Prim.replyDeadline() == (0 : Nat64); + assert 0 : Nat64 == Prim.replyDeadline(); Prim.debugPrintNat c; }; public func get() : async Nat { return c }; public query func read() : async Nat { - assert Prim.replyDeadline() == (0 : Nat64); + assert 0 : Nat64 == Prim.replyDeadline(); let tmp = c; c += 1; Prim.debugPrint "In read:";