From a0decd22b6534663818c1780b1726d59cbe615c2 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Thu, 26 May 2016 19:01:35 -0700 Subject: 3017 --- html/070text.mu.html | 254 +++++++++++++++++++++++++-------------------------- 1 file changed, 127 insertions(+), 127 deletions(-) (limited to 'html/070text.mu.html') diff --git a/html/070text.mu.html b/html/070text.mu.html index 12114ddd..7b1c40d7 100644 --- a/html/070text.mu.html +++ b/html/070text.mu.html @@ -84,10 +84,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color run [ local-scope x:address:array:character <- new [abc] - 3:boolean/raw <- equal x, x + 10:boolean/raw <- equal x, x ] memory-should-contain [ - 3 <- 1 # x == x for all x + 10 <- 1 # x == x for all x ] ] @@ -96,10 +96,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color local-scope x:address:array:character <- new [abc] y:address:array:character <- new [abc] - 3:boolean/raw <- equal x, y + 10:boolean/raw <- equal x, y ] memory-should-contain [ - 3 <- 1 # abc == abc + 10 <- 1 # abc == abc ] ] @@ -108,10 +108,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color local-scope x:address:array:character <- new [abc] y:address:array:character <- new [abcd] - 3:boolean/raw <- equal x, y + 10:boolean/raw <- equal x, y ] memory-should-contain [ - 3 <- 0 # abc != abcd + 10 <- 0 # abc != abcd ] trace-should-contain [ text-equal: comparing lengths @@ -126,10 +126,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color local-scope x:address:array:character <- new [] y:address:array:character <- new [abcd] - 3:boolean/raw <- equal x, y + 10:boolean/raw <- equal x, y ] memory-should-contain [ - 3 <- 0 # "" != abcd + 10 <- 0 # "" != abcd ] ] @@ -138,10 +138,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color local-scope x:address:array:character <- new [abc] y:address:array:character <- new [abd] - 3:boolean/raw <- equal x, y + 10:boolean/raw <- equal x, y ] memory-should-contain [ - 3 <- 0 # abc != abd + 10 <- 0 # abc != abd ] ] @@ -246,33 +246,33 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color c:character <- copy 99/c x <- append x, c s2:address:array:character <- get *x, data:offset - 1:boolean/raw <- equal s1, s2 - 2:array:character/raw <- copy *s2 + 10:boolean/raw <- equal s1, s2 + 11:array:character/raw <- copy *s2 +buffer-filled c:character <- copy 100/d x <- append x, c s3:address:array:character <- get *x, data:offset - 10:boolean/raw <- equal s1, s3 - 11:number/raw <- get *x, length:offset - 12:array:character/raw <- copy *s3 + 20:boolean/raw <- equal s1, s3 + 21:number/raw <- get *x, length:offset + 30:array:character/raw <- copy *s3 ] memory-should-contain [ # before +buffer-filled - 1 <- 1 # no change in data pointer - 2 <- 3 # size of data - 3 <- 97 # data - 4 <- 98 - 5 <- 99 + 10 <- 1 # no change in data pointer + 11 <- 3 # size of data + 12 <- 97 # data + 13 <- 98 + 14 <- 99 # in the end - 10 <- 0 # data pointer has grown - 11 <- 4 # final length - 12 <- 6 # but data's capacity has doubled - 13 <- 97 # data - 14 <- 98 - 15 <- 99 - 16 <- 100 - 17 <- 0 - 18 <- 0 + 20 <- 0 # data pointer has grown + 21 <- 4 # final length + 30 <- 6 # but data's capacity has doubled + 31 <- 97 # data + 32 <- 98 + 33 <- 99 + 34 <- 100 + 35 <- 0 + 36 <- 0 ] ] @@ -287,12 +287,12 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color c:character <- copy 8/backspace x <- append x, c s:address:array:character <- buffer-to-array x - 1:array:character/raw <- copy *s + 10:array:character/raw <- copy *s ] memory-should-contain [ - 1 <- 1 # length - 2 <- 97 # contents - 3 <- 0 + 10 <- 1 # length + 11 <- 97 # contents + 12 <- 0 ] ] @@ -365,10 +365,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color x:address:array:character <- new [hello,] y:address:array:character <- new [ world!] z:address:array:character <- append x, y - 1:array:character/raw <- copy *z + 10:array:character/raw <- copy *z ] memory-should-contain [ - 1:array:character <- [hello, world!] + 10:array:character <- [hello, world!] ] ] @@ -378,10 +378,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color x:address:array:character <- copy 0 y:address:array:character <- new [ world!] z:address:array:character <- append x, y - 1:array:character/raw <- copy *z + 10:array:character/raw <- copy *z ] memory-should-contain [ - 1:array:character <- [ world!] + 10:array:character <- [ world!] ] ] @@ -391,10 +391,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color x:address:array:character <- new [hello,] y:address:array:character <- copy 0 z:address:array:character <- append x, y - 1:array:character/raw <- copy *z + 10:array:character/raw <- copy *z ] memory-should-contain [ - 1:array:character <- [hello,] + 10:array:character <- [hello,] ] ] @@ -403,10 +403,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color local-scope x:address:array:character <- new [abc] x <- replace x, 98/b, 122/z - 1:array:character/raw <- copy *x + 10:array:character/raw <- copy *x ] memory-should-contain [ - 1:array:character <- [azc] + 10:array:character <- [azc] ] ] @@ -427,10 +427,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color local-scope x:address:array:character <- new [abc] x <- replace x, 97/a, 122/z - 1:array:character/raw <- copy *x + 10:array:character/raw <- copy *x ] memory-should-contain [ - 1:array:character <- [zbc] + 10:array:character <- [zbc] ] ] @@ -439,10 +439,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color local-scope x:address:array:character <- new [abc] x <- replace x, 99/c, 122/z - 1:array:character/raw <- copy *x + 10:array:character/raw <- copy *x ] memory-should-contain [ - 1:array:character <- [abz] + 10:array:character <- [abz] ] ] @@ -451,10 +451,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color local-scope x:address:array:character <- new [abc] x <- replace x, 100/d, 122/z - 1:array:character/raw <- copy *x + 10:array:character/raw <- copy *x ] memory-should-contain [ - 1:array:character <- [abc] + 10:array:character <- [abc] ] ] @@ -463,10 +463,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color local-scope x:address:array:character <- new [banana] x <- replace x, 97/a, 122/z - 1:array:character/raw <- copy *x + 10:array:character/raw <- copy *x ] memory-should-contain [ - 1:array:character <- [bznznz] + 10:array:character <- [bznznz] ] ] @@ -547,13 +547,13 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color scenario interpolate-works [ run [ local-scope - x:address:array:character <- new [abc _] + x:address:array:character <- new [abc_ghi] y:address:array:character <- new [def] z:address:array:character <- interpolate x, y - 1:array:character/raw <- copy *z + 10:array:character/raw <- copy *z ] memory-should-contain [ - 1:array:character <- [abc def] + 10:array:character <- [abcdefghi] ] ] @@ -563,11 +563,11 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color x:address:array:character <- new [_, hello!] y:address:array:character <- new [abc] z:address:array:character <- interpolate x, y - 1:array:character/raw <- copy *z + 10:array:character/raw <- copy *z ] memory-should-contain [ - 1:array:character <- [abc, hello!] - 13 <- 0 # out of bounds + 10:array:character <- [abc, hello!] + 22 <- 0 # out of bounds ] ] @@ -576,10 +576,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color x:address:array:character <- new [hello, _] y:address:array:character <- new [abc] z:address:array:character <- interpolate x, y - 4:array:character/raw <- copy *z + 10:array:character/raw <- copy *z ] memory-should-contain [ - 4:array:character <- [hello, abc] + 10:array:character <- [hello, abc] ] ] @@ -775,10 +775,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color run [ local-scope x:address:array:character <- new [a/b] - 1:number/raw <- find-next x, 47/slash, 0/start-index + 10:number/raw <- find-next x, 47/slash, 0/start-index ] memory-should-contain [ - 1 <- 1 + 10 <- 1 ] ] @@ -786,10 +786,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color run [ local-scope x:address:array:character <- new [] - 1:number/raw <- find-next x, 47/slash, 0/start-index + 10:number/raw <- find-next x, 47/slash, 0/start-index ] memory-should-contain [ - 1 <- 0 + 10 <- 0 ] ] @@ -797,10 +797,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color run [ local-scope x:address:array:character <- new [/abc] - 1:number/raw <- find-next x, 47/slash, 0/start-index + 10:number/raw <- find-next x, 47/slash, 0/start-index ] memory-should-contain [ - 1 <- 0 # prefix match + 10 <- 0 # prefix match ] ] @@ -808,10 +808,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color run [ local-scope x:address:array:character <- new [abc/] - 1:number/raw <- find-next x, 47/slash, 0/start-index + 10:number/raw <- find-next x, 47/slash, 0/start-index ] memory-should-contain [ - 1 <- 3 # suffix match + 10 <- 3 # suffix match ] ] @@ -819,10 +819,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color run [ local-scope x:address:array:character <- new [abcd] - 1:number/raw <- find-next x, 47/slash, 0/start-index + 10:number/raw <- find-next x, 47/slash, 0/start-index ] memory-should-contain [ - 1 <- 4 # no match + 10 <- 4 # no match ] ] @@ -830,10 +830,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color run [ local-scope x:address:array:character <- new [abc] - 1:number/raw <- find-next x, 47/slash, 4/start-index + 10:number/raw <- find-next x, 47/slash, 4/start-index ] memory-should-contain [ - 1 <- 4 # no change + 10 <- 4 # no change ] ] @@ -841,10 +841,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color run [ local-scope x:address:array:character <- new [ab/c/] - 1:number/raw <- find-next x, 47/slash, 0/start-index + 10:number/raw <- find-next x, 47/slash, 0/start-index ] memory-should-contain [ - 1 <- 2 # first '/' of multiple + 10 <- 2 # first '/' of multiple ] ] @@ -852,10 +852,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color run [ local-scope x:address:array:character <- new [ab/c/] - 1:number/raw <- find-next x, 47/slash, 3/start-index + 10:number/raw <- find-next x, 47/slash, 3/start-index ] memory-should-contain [ - 1 <- 4 # second '/' of multiple + 10 <- 4 # second '/' of multiple ] ] @@ -910,10 +910,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color local-scope x:address:array:character <- new [abc] y:address:array:character <- new [bd] - 1:number/raw <- find-next x, y, 0 + 10:number/raw <- find-next x, y, 0 ] memory-should-contain [ - 1 <- 3 # not found + 10 <- 3 # not found ] ] @@ -922,10 +922,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color local-scope x:address:array:character <- new [abcd] y:address:array:character <- new [cd] - 1:number/raw <- find-next x, y, 0 + 10:number/raw <- find-next x, y, 0 ] memory-should-contain [ - 1 <- 2 + 10 <- 2 ] ] @@ -934,10 +934,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color local-scope x:address:array:character <- new [abcd] y:address:array:character <- new [cde] - 1:number/raw <- find-next x, y, 0 + 10:number/raw <- find-next x, y, 0 ] memory-should-contain [ - 1 <- 4 # not found + 10 <- 4 # not found ] ] @@ -978,10 +978,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color local-scope x:address:array:character <- new [abc] y:address:array:character <- new [ab] - 1:boolean/raw <- match-at x, y, 0 + 10:boolean/raw <- match-at x, y, 0 ] memory-should-contain [ - 1 <- 1 # match found + 10 <- 1 # match found ] ] @@ -989,10 +989,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color run [ local-scope x:address:array:character <- new [abc] - 1:boolean/raw <- match-at x, x, 0 + 10:boolean/raw <- match-at x, x, 0 ] memory-should-contain [ - 1 <- 1 # match found + 10 <- 1 # match found ] ] @@ -1001,10 +1001,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color local-scope x:address:array:character <- new [abc] y:address:array:character <- new [a] - 1:boolean/raw <- match-at x, y, 4 + 10:boolean/raw <- match-at x, y, 4 ] memory-should-contain [ - 1 <- 0 # never matches + 10 <- 0 # never matches ] ] @@ -1013,10 +1013,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color local-scope x:address:array:character <- new [abc] y:address:array:character <- new [] - 1:boolean/raw <- match-at x, y, 0 + 10:boolean/raw <- match-at x, y, 0 ] memory-should-contain [ - 1 <- 1 # always matches empty pattern given a valid index + 10 <- 1 # always matches empty pattern given a valid index ] ] @@ -1025,10 +1025,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color local-scope x:address:array:character <- new [abc] y:address:array:character <- new [] - 1:boolean/raw <- match-at x, y, 4 + 10:boolean/raw <- match-at x, y, 4 ] memory-should-contain [ - 1 <- 0 # no match + 10 <- 0 # no match ] ] @@ -1037,10 +1037,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color local-scope x:address:array:character <- new [] y:address:array:character <- new [abc] - 1:boolean/raw <- match-at x, y, 0 + 10:boolean/raw <- match-at x, y, 0 ] memory-should-contain [ - 1 <- 0 # no match + 10 <- 0 # no match ] ] @@ -1048,10 +1048,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color run [ local-scope x:address:array:character <- new [] - 1:boolean/raw <- match-at x, x, 0 + 10:boolean/raw <- match-at x, x, 0 ] memory-should-contain [ - 1 <- 1 # matches because pattern is also empty + 10 <- 1 # matches because pattern is also empty ] ] @@ -1060,10 +1060,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color local-scope x:address:array:character <- new [abc] y:address:array:character <- new [bc] - 1:boolean/raw <- match-at x, y, 1 + 10:boolean/raw <- match-at x, y, 1 ] memory-should-contain [ - 1 <- 1 # match + 10 <- 1 # match ] ] @@ -1072,10 +1072,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color local-scope x:address:array:character <- new [abc] y:address:array:character <- new [bc] - 1:boolean/raw <- match-at x, y, 0 + 10:boolean/raw <- match-at x, y, 0 ] memory-should-contain [ - 1 <- 0 # no match + 10 <- 0 # no match ] ] @@ -1126,16 +1126,16 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color local-scope x:address:array:character <- new [a/b] y:address:array:address:array:character <- split x, 47/slash - 1:number/raw <- length *y + 10:number/raw <- length *y a:address:array:character <- index *y, 0 b:address:array:character <- index *y, 1 - 10:array:character/raw <- copy *a - 20:array:character/raw <- copy *b + 20:array:character/raw <- copy *a + 30:array:character/raw <- copy *b ] memory-should-contain [ - 1 <- 2 # length of result - 10:array:character <- [a] - 20:array:character <- [b] + 10 <- 2 # length of result + 20:array:character <- [a] + 30:array:character <- [b] ] ] @@ -1144,19 +1144,19 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color local-scope x:address:array:character <- new [a/b/c] y:address:array:address:array:character <- split x, 47/slash - 1:number/raw <- length *y + 10:number/raw <- length *y a:address:array:character <- index *y, 0 b:address:array:character <- index *y, 1 c:address:array:character <- index *y, 2 - 10:array:character/raw <- copy *a - 20:array:character/raw <- copy *b - 30:array:character/raw <- copy *c + 20:array:character/raw <- copy *a + 30:array:character/raw <- copy *b + 40:array:character/raw <- copy *c ] memory-should-contain [ - 1 <- 3 # length of result - 10:array:character <- [a] - 20:array:character <- [b] - 30:array:character <- [c] + 10 <- 3 # length of result + 20:array:character <- [a] + 30:array:character <- [b] + 40:array:character <- [c] ] ] @@ -1165,13 +1165,13 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color local-scope x:address:array:character <- new [abc] y:address:array:address:array:character <- split x, 47/slash - 1:number/raw <- length *y + 10:number/raw <- length *y a:address:array:character <- index *y, 0 - 10:array:character/raw <- copy *a + 20:array:character/raw <- copy *a ] memory-should-contain [ - 1 <- 1 # length of result - 10:array:character <- [abc] + 10 <- 1 # length of result + 20:array:character <- [abc] ] ] @@ -1180,10 +1180,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color local-scope x:address:array:character <- new [] y:address:array:address:array:character <- split x, 47/slash - 1:number/raw <- length *y + 10:number/raw <- length *y ] memory-should-contain [ - 1 <- 0 # empty result + 10 <- 0 # empty result ] ] @@ -1192,22 +1192,22 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color local-scope x:address:array:character <- new [a/b//c] y:address:array:address:array:character <- split x:address:array:character, 47/slash - 1:number/raw <- length *y + 10:number/raw <- length *y a:address:array:character <- index *y, 0 b:address:array:character <- index *y, 1 c:address:array:character <- index *y, 2 d:address:array:character <- index *y, 3 - 10:array:character/raw <- copy *a - 20:array:character/raw <- copy *b - 30:array:character/raw <- copy *c - 40:array:character/raw <- copy *d + 20:array:character/raw <- copy *a + 30:array:character/raw <- copy *b + 40:array:character/raw <- copy *c + 50:array:character/raw <- copy *d ] memory-should-contain [ - 1 <- 4 # length of result - 10:array:character <- [a] - 20:array:character <- [b] - 30:array:character <- [] - 40:array:character <- [c] + 10 <- 4 # length of result + 20:array:character <- [a] + 30:array:character <- [b] + 40:array:character <- [] + 50:array:character <- [c] ] ] -- cgit 1.4.1-2-gfad0