From 1694f9a3b5b43c2ea871271d77f74ccaa9606edb Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Fri, 31 Jul 2020 16:15:39 -0700 Subject: 6694 --- html/403stream.mu.html | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) (limited to 'html') diff --git a/html/403stream.mu.html b/html/403stream.mu.html index c07d583f..3fd82d2a 100644 --- a/html/403stream.mu.html +++ b/html/403stream.mu.html @@ -82,25 +82,26 @@ if ('onhashchange' in window) { 24 var y: int 25 var y2/ebx: (addr int) <- address y 26 read-from-stream s2, y2 -27 check-ints-equal y, 0x34, "F - test-stream" -28 tmp <- stream-empty? s2 -29 check-true tmp, "F - test-stream/empty?/2" -30 tmp <- stream-full? s2 -31 check-false tmp, "F - test-stream/full?/2" -32 } -33 -34 fn test-stream-full { -35 # write an int to a stream of capacity 1 -36 var s: (stream int 1) -37 var s2/ecx: (addr stream int 1) <- address s -38 var tmp/eax: boolean <- stream-full? s2 -39 check-false tmp, "F - test-stream-full?/pre" -40 var x: int -41 var x2/edx: (addr int) <- address x -42 write-to-stream s2, x2 -43 tmp <- stream-full? s2 -44 check-true tmp, "F - test-stream-full?" -45 } +27 tmp <- stream-empty? s2 +28 check-true tmp, "F - test-stream/empty?/2" +29 tmp <- stream-full? s2 +30 check-false tmp, "F - test-stream/full?/2" +31 # we read back what was written +32 check-ints-equal y, 0x34, "F - test-stream" +33 } +34 +35 fn test-stream-full { +36 # write an int to a stream of capacity 1 +37 var s: (stream int 1) +38 var s2/ecx: (addr stream int 1) <- address s +39 var tmp/eax: boolean <- stream-full? s2 +40 check-false tmp, "F - test-stream-full?/pre" +41 var x: int +42 var x2/edx: (addr int) <- address x +43 write-to-stream s2, x2 +44 tmp <- stream-full? s2 +45 check-true tmp, "F - test-stream-full?" +46 } -- cgit 1.4.1-2-gfad0