diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-04-08 00:47:04 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-04-08 00:47:04 -0700 |
commit | e38c85a1eb6a0107ed43d7d7dbc9f4080a917c59 (patch) | |
tree | 4507d37728f9ed4ebb1dab2960d751415bbaf10f /cpp/032string.mu | |
parent | fd2cba359fbf6897741dbd14f23f32a9ce638e14 (diff) | |
download | mu-e38c85a1eb6a0107ed43d7d7dbc9f4080a917c59.tar.gz |
1037 - support scenarios in mu files
I'd forgotten that I hadn't yet committed this change in my comment to commit 1031. Now if I don't freeze things after loading the string-equal tests do fail as expected because the recipe was deleted.
Diffstat (limited to 'cpp/032string.mu')
-rw-r--r-- | cpp/032string.mu | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/cpp/032string.mu b/cpp/032string.mu index 38d9d06f..17608e5f 100644 --- a/cpp/032string.mu +++ b/cpp/032string.mu @@ -39,7 +39,7 @@ scenario string-equal-reflexive [ ] ] -scenario string-equal [ +scenario string-equal-identical [ run [ default-space:address:space <- new location:type, 30:literal x:address:array:character <- new [abc] @@ -47,11 +47,11 @@ scenario string-equal [ 3:boolean/raw <- string-equal x:address:array:character, y:address:array:character ] memory should contain [ - 3 <- 1 # abc == abd + 3 <- 1 # abc == abc ] ] -scenario string-equal2 [ +scenario string-equal-distinct-lengths [ run [ default-space:address:space <- new location:type, 30:literal x:address:array:character <- new [abc] @@ -59,6 +59,30 @@ scenario string-equal2 [ 3:boolean/raw <- string-equal x:address:array:character, y:address:array:character ] memory should contain [ + 3 <- 0 # abc != abcd + ] +] + +scenario string-equal-with-empty [ + run [ + default-space:address:space <- new location:type, 30:literal + x:address:array:character <- new [] + y:address:array:character <- new [abcd] + 3:boolean/raw <- string-equal x:address:array:character, y:address:array:character + ] + memory should contain [ + 3 <- 0 # "" != abcd + ] +] + +scenario string-equal-common-lengths-but-distinct [ + run [ + default-space:address:space <- new location:type, 30:literal + x:address:array:character <- new [abc] + y:address:array:character <- new [abd] + 3:boolean/raw <- string-equal x:address:array:character, y:address:array:character + ] + memory should contain [ 3 <- 0 # abc != abd ] ] |