From 51728d9334f642958f80bf442b40a76decdccafe Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 19 Aug 2017 05:53:31 -0700 Subject: 3971 --- html/010vm.cc.html | 84 +++++++++++++++++++++++++++--------------------------- 1 file changed, 42 insertions(+), 42 deletions(-) (limited to 'html/010vm.cc.html') diff --git a/html/010vm.cc.html b/html/010vm.cc.html index f63823e7..8fa02525 100644 --- a/html/010vm.cc.html +++ b/html/010vm.cc.html @@ -172,7 +172,7 @@ if ('onhashchange' in window) { 108 :(before "End Globals") 109 // Locations refer to a common 'memory'. Each location can store a number. 110 map<int, double> Memory; -111 :(before "End Setup") +111 :(before "End Reset") 112 Memory.clear(); 113 114 :(after "Types") @@ -278,7 +278,7 @@ if ('onhashchange' in window) { 214 // End Load Recipes 215 :(before "End Commandline Parsing") 216 assert(Next_recipe_ordinal < 1000); // recipes being tested didn't overflow into test space -217 :(before "End Setup") +217 :(before "End Reset") 218 Next_recipe_ordinal = 1000; // consistent new numbers for each test 219 220 //: One final detail: tests can modify our global tables of recipes and types, @@ -291,7 +291,7 @@ if ('onhashchange' in window) { 227 map<type_ordinal, type_info> Type_snapshot; 228 :(before "End One-time Setup") 229 save_snapshots(); -230 :(before "End Setup") +230 :(before "End Reset") 231 restore_snapshots(); 232 233 :(code) @@ -351,7 +351,7 @@ if ('onhashchange' in window) { 287 type = new_type_tree(type_names); 288 delete type_names; 289 // special cases -290 if (is_integer(name) && type == NULL) +290 if (is_integer(name) && type == NULL) 291 ¦ type = new type_tree("literal"); 292 if (name == "_" && type == NULL) 293 ¦ type = new type_tree("literal"); @@ -384,19 +384,19 @@ if ('onhashchange' in window) { 320 void test_parse_property_list_atom() { 321 istringstream in("a"); 322 string_tree* x = parse_property_list(in); -323 CHECK(x->atom); +323 CHECK(x->atom); 324 delete x; 325 } 326 void test_parse_property_list_list() { 327 istringstream in("a:b"); 328 string_tree* x = parse_property_list(in); -329 CHECK(!x->atom); -330 CHECK(x->left->atom); -331 CHECK_EQ(x->left->value, "a"); -332 CHECK(!x->right->atom); -333 CHECK(x->right->left->atom); -334 CHECK_EQ(x->right->left->value, "b"); -335 CHECK(x->right->right == NULL); +329 CHECK(!x->atom); +330 CHECK(x->left->atom); +331 CHECK_EQ(x->left->value, "a"); +332 CHECK(!x->right->atom); +333 CHECK(x->right->left->atom); +334 CHECK_EQ(x->right->left->value, "b"); +335 CHECK(x->right->right == NULL); 336 delete x; 337 } 338 @@ -408,7 +408,7 @@ if ('onhashchange' in window) { 344 ¦ int value = 0; 345 ¦ if (contains_key(Type_ordinal, type_name)) 346 ¦ ¦ value = get(Type_ordinal, type_name); -347 ¦ else if (is_integer(type_name)) // sometimes types will contain non-type tags, like numbers for the size of an array +347 ¦ else if (is_integer(type_name)) // sometimes types will contain non-type tags, like numbers for the size of an array 348 ¦ ¦ value = 0; 349 ¦ else if (properties->value == "->") // used in recipe types 350 ¦ ¦ value = 0; @@ -489,43 +489,43 @@ if ('onhashchange' in window) { 425 // These unit tests don't always use valid types. 426 void test_compare_atom_types() { 427 reagent a("a:address"), b("b:boolean"); -428 CHECK(*a.type < *b.type); -429 CHECK(!(*b.type < *a.type)); +428 CHECK(*a.type < *b.type); +429 CHECK(!(*b.type < *a.type)); 430 } 431 void test_compare_equal_atom_types() { 432 reagent a("a:address"), b("b:address"); -433 CHECK(!(*a.type < *b.type)); -434 CHECK(!(*b.type < *a.type)); +433 CHECK(!(*a.type < *b.type)); +434 CHECK(!(*b.type < *a.type)); 435 } 436 void test_compare_atom_with_non_atom() { 437 reagent a("a:address:number"), b("b:boolean"); -438 CHECK(!(*a.type < *b.type)); -439 CHECK(*b.type < *a.type); +438 CHECK(!(*a.type < *b.type)); +439 CHECK(*b.type < *a.type); 440 } 441 void test_compare_lists_with_identical_structure() { 442 reagent a("a:address:address"), b("b:address:boolean"); -443 CHECK(*a.type < *b.type); -444 CHECK(!(*b.type < *a.type)); +443 CHECK(*a.type < *b.type); +444 CHECK(!(*b.type < *a.type)); 445 } 446 void test_compare_identical_lists() { 447 reagent a("a:address:boolean"), b("b:address:boolean"); -448 CHECK(!(*a.type < *b.type)); -449 CHECK(!(*b.type < *a.type)); +448 CHECK(!(*a.type < *b.type)); +449 CHECK(!(*b.type < *a.type)); 450 } 451 void test_compare_list_with_extra_element() { 452 reagent a("a:address:address"), b("b:address:address:number"); -453 CHECK(*a.type < *b.type); -454 CHECK(!(*b.type < *a.type)); +453 CHECK(*a.type < *b.type); +454 CHECK(!(*b.type < *a.type)); 455 } 456 void test_compare_list_with_smaller_left_but_larger_right() { 457 reagent a("a:address:number"), b("b:character:array"); -458 CHECK(*a.type < *b.type); -459 CHECK(!(*b.type < *a.type)); +458 CHECK(*a.type < *b.type); +459 CHECK(!(*b.type < *a.type)); 460 } 461 void test_compare_list_with_smaller_left_but_larger_right_identical_types() { 462 reagent a("a:address:boolean"), b("b:boolean:address"); -463 CHECK(*a.type < *b.type); -464 CHECK(!(*b.type < *a.type)); +463 CHECK(*a.type < *b.type); +464 CHECK(!(*b.type < *a.type)); 465 } 466 467 :(code) @@ -907,19 +907,19 @@ if ('onhashchange' in window) { 843 } 844 845 void test_trim_floating_point() { -846 CHECK_EQ(trim_floating_point(""), ""); -847 CHECK_EQ(trim_floating_point(".0"), "0"); -848 CHECK_EQ(trim_floating_point("1.5000"), "1.5"); -849 CHECK_EQ(trim_floating_point("1.000001"), "1.000001"); -850 CHECK_EQ(trim_floating_point("23.000000"), "23"); -851 CHECK_EQ(trim_floating_point("23.0"), "23"); -852 CHECK_EQ(trim_floating_point("23."), "23"); -853 CHECK_EQ(trim_floating_point("23"), "23"); -854 CHECK_EQ(trim_floating_point("230"), "230"); -855 CHECK_EQ(trim_floating_point("3.000000"), "3"); -856 CHECK_EQ(trim_floating_point("3.0"), "3"); -857 CHECK_EQ(trim_floating_point("3."), "3"); -858 CHECK_EQ(trim_floating_point("3"), "3"); +846 CHECK_EQ(trim_floating_point(""), ""); +847 CHECK_EQ(trim_floating_point(".0"), "0"); +848 CHECK_EQ(trim_floating_point("1.5000"), "1.5"); +849 CHECK_EQ(trim_floating_point("1.000001"), "1.000001"); +850 CHECK_EQ(trim_floating_point("23.000000"), "23"); +851 CHECK_EQ(trim_floating_point("23.0"), "23"); +852 CHECK_EQ(trim_floating_point("23."), "23"); +853 CHECK_EQ(trim_floating_point("23"), "23"); +854 CHECK_EQ(trim_floating_point("230"), "230"); +855 CHECK_EQ(trim_floating_point("3.000000"), "3"); +856 CHECK_EQ(trim_floating_point("3.0"), "3"); +857 CHECK_EQ(trim_floating_point("3."), "3"); +858 CHECK_EQ(trim_floating_point("3"), "3"); 859 } 860 861 :(before "End Includes") -- cgit 1.4.1-2-gfad0