| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 int64_t hasha = static_cast<int64_t>(a.Hashcode()); | 51 int64_t hasha = static_cast<int64_t>(a.Hashcode()); |
| 52 int64_t hashb = static_cast<int64_t>(b.Hashcode()); | 52 int64_t hashb = static_cast<int64_t>(b.Hashcode()); |
| 53 CHECK_NE(static_cast<int64_t>(0), hasha); | 53 CHECK_NE(static_cast<int64_t>(0), hasha); |
| 54 CHECK_NE(static_cast<int64_t>(0), hashb); | 54 CHECK_NE(static_cast<int64_t>(0), hashb); |
| 55 CHECK_NE(hasha, hashb); | 55 CHECK_NE(hasha, hashb); |
| 56 } | 56 } |
| 57 | 57 |
| 58 | 58 |
| 59 TEST(UniqueCreate) { | 59 TEST(UniqueCreate) { |
| 60 CcTest::InitializeVM(); | 60 CcTest::InitializeVM(); |
| 61 Isolate* isolate = Isolate::Current(); | 61 Isolate* isolate = CcTest::i_isolate(); |
| 62 Factory* factory = isolate->factory(); | 62 Factory* factory = isolate->factory(); |
| 63 HandleScope sc(isolate); | 63 HandleScope sc(isolate); |
| 64 | 64 |
| 65 Handle<String> A = factory->InternalizeUtf8String("A"); | 65 Handle<String> A = factory->InternalizeUtf8String("A"); |
| 66 Unique<String> HA(A); | 66 Unique<String> HA(A); |
| 67 | 67 |
| 68 CHECK(*HA.handle() == *A); | 68 CHECK(*HA.handle() == *A); |
| 69 CHECK_EQ(*A, *HA.handle()); | 69 CHECK_EQ(*A, *HA.handle()); |
| 70 | 70 |
| 71 Unique<String> HA2(A); | 71 Unique<String> HA2(A); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 86 | 86 |
| 87 CHECK(HB != HA); | 87 CHECK(HB != HA); |
| 88 CHECK_NE(*HB.handle(), *HA.handle()); | 88 CHECK_NE(*HB.handle(), *HA.handle()); |
| 89 | 89 |
| 90 // TODO(titzer): check that Unique properly survives a GC. | 90 // TODO(titzer): check that Unique properly survives a GC. |
| 91 } | 91 } |
| 92 | 92 |
| 93 | 93 |
| 94 TEST(UniqueSubsume) { | 94 TEST(UniqueSubsume) { |
| 95 CcTest::InitializeVM(); | 95 CcTest::InitializeVM(); |
| 96 Isolate* isolate = Isolate::Current(); | 96 Isolate* isolate = CcTest::i_isolate(); |
| 97 Factory* factory = isolate->factory(); | 97 Factory* factory = isolate->factory(); |
| 98 HandleScope sc(isolate); | 98 HandleScope sc(isolate); |
| 99 | 99 |
| 100 Handle<String> A = factory->InternalizeUtf8String("A"); | 100 Handle<String> A = factory->InternalizeUtf8String("A"); |
| 101 Unique<String> HA(A); | 101 Unique<String> HA(A); |
| 102 | 102 |
| 103 CHECK(*HA.handle() == *A); | 103 CHECK(*HA.handle() == *A); |
| 104 CHECK_EQ(*A, *HA.handle()); | 104 CHECK_EQ(*A, *HA.handle()); |
| 105 | 105 |
| 106 Unique<Object> HO = HA; // Here comes the subsumption, boys. | 106 Unique<Object> HO = HA; // Here comes the subsumption, boys. |
| 107 | 107 |
| 108 CheckHashCodeEqual(HA, HO); | 108 CheckHashCodeEqual(HA, HO); |
| 109 CHECK(HA == HO); | 109 CHECK(HA == HO); |
| 110 CHECK_EQ(*HA.handle(), *HO.handle()); | 110 CHECK_EQ(*HA.handle(), *HO.handle()); |
| 111 | 111 |
| 112 CHECK(HO == HA); | 112 CHECK(HO == HA); |
| 113 CHECK_EQ(*HO.handle(), *HA.handle()); | 113 CHECK_EQ(*HO.handle(), *HA.handle()); |
| 114 } | 114 } |
| 115 | 115 |
| 116 | 116 |
| 117 TEST(UniqueSet_Add) { | 117 TEST(UniqueSet_Add) { |
| 118 CcTest::InitializeVM(); | 118 CcTest::InitializeVM(); |
| 119 Isolate* isolate = Isolate::Current(); | 119 Isolate* isolate = CcTest::i_isolate(); |
| 120 Factory* factory = isolate->factory(); | 120 Factory* factory = isolate->factory(); |
| 121 HandleScope sc(isolate); | 121 HandleScope sc(isolate); |
| 122 | 122 |
| 123 Unique<String> A(factory->InternalizeUtf8String("A")); | 123 Unique<String> A(factory->InternalizeUtf8String("A")); |
| 124 Unique<String> B(factory->InternalizeUtf8String("B")); | 124 Unique<String> B(factory->InternalizeUtf8String("B")); |
| 125 Unique<String> C(factory->InternalizeUtf8String("C")); | 125 Unique<String> C(factory->InternalizeUtf8String("C")); |
| 126 | 126 |
| 127 Zone zone(isolate); | 127 Zone zone(isolate); |
| 128 | 128 |
| 129 UniqueSet<String>* set = new(&zone) UniqueSet<String>(); | 129 UniqueSet<String>* set = new(&zone) UniqueSet<String>(); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 141 CHECK_EQ(3, set->size()); | 141 CHECK_EQ(3, set->size()); |
| 142 set->Add(B, &zone); | 142 set->Add(B, &zone); |
| 143 CHECK_EQ(3, set->size()); | 143 CHECK_EQ(3, set->size()); |
| 144 set->Add(A, &zone); | 144 set->Add(A, &zone); |
| 145 CHECK_EQ(3, set->size()); | 145 CHECK_EQ(3, set->size()); |
| 146 } | 146 } |
| 147 | 147 |
| 148 | 148 |
| 149 TEST(UniqueSet_Contains) { | 149 TEST(UniqueSet_Contains) { |
| 150 CcTest::InitializeVM(); | 150 CcTest::InitializeVM(); |
| 151 Isolate* isolate = Isolate::Current(); | 151 Isolate* isolate = CcTest::i_isolate(); |
| 152 Factory* factory = isolate->factory(); | 152 Factory* factory = isolate->factory(); |
| 153 HandleScope sc(isolate); | 153 HandleScope sc(isolate); |
| 154 | 154 |
| 155 Unique<String> A(factory->InternalizeUtf8String("A")); | 155 Unique<String> A(factory->InternalizeUtf8String("A")); |
| 156 Unique<String> B(factory->InternalizeUtf8String("B")); | 156 Unique<String> B(factory->InternalizeUtf8String("B")); |
| 157 Unique<String> C(factory->InternalizeUtf8String("C")); | 157 Unique<String> C(factory->InternalizeUtf8String("C")); |
| 158 | 158 |
| 159 Zone zone(isolate); | 159 Zone zone(isolate); |
| 160 | 160 |
| 161 UniqueSet<String>* set = new(&zone) UniqueSet<String>(); | 161 UniqueSet<String>* set = new(&zone) UniqueSet<String>(); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 177 | 177 |
| 178 set->Add(C, &zone); | 178 set->Add(C, &zone); |
| 179 CHECK(set->Contains(A)); | 179 CHECK(set->Contains(A)); |
| 180 CHECK(set->Contains(B)); | 180 CHECK(set->Contains(B)); |
| 181 CHECK(set->Contains(C)); | 181 CHECK(set->Contains(C)); |
| 182 } | 182 } |
| 183 | 183 |
| 184 | 184 |
| 185 TEST(UniqueSet_At) { | 185 TEST(UniqueSet_At) { |
| 186 CcTest::InitializeVM(); | 186 CcTest::InitializeVM(); |
| 187 Isolate* isolate = Isolate::Current(); | 187 Isolate* isolate = CcTest::i_isolate(); |
| 188 Factory* factory = isolate->factory(); | 188 Factory* factory = isolate->factory(); |
| 189 HandleScope sc(isolate); | 189 HandleScope sc(isolate); |
| 190 | 190 |
| 191 Unique<String> A(factory->InternalizeUtf8String("A")); | 191 Unique<String> A(factory->InternalizeUtf8String("A")); |
| 192 Unique<String> B(factory->InternalizeUtf8String("B")); | 192 Unique<String> B(factory->InternalizeUtf8String("B")); |
| 193 Unique<String> C(factory->InternalizeUtf8String("C")); | 193 Unique<String> C(factory->InternalizeUtf8String("C")); |
| 194 | 194 |
| 195 Zone zone(isolate); | 195 Zone zone(isolate); |
| 196 | 196 |
| 197 UniqueSet<String>* set = new(&zone) UniqueSet<String>(); | 197 UniqueSet<String>* set = new(&zone) UniqueSet<String>(); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 219 UniqueSet<T>* set1, UniqueSet<T>* set2, bool expected) { | 219 UniqueSet<T>* set1, UniqueSet<T>* set2, bool expected) { |
| 220 CHECK(set1->Equals(set1)); | 220 CHECK(set1->Equals(set1)); |
| 221 CHECK(set2->Equals(set2)); | 221 CHECK(set2->Equals(set2)); |
| 222 CHECK(expected == set1->Equals(set2)); | 222 CHECK(expected == set1->Equals(set2)); |
| 223 CHECK(expected == set2->Equals(set1)); | 223 CHECK(expected == set2->Equals(set1)); |
| 224 } | 224 } |
| 225 | 225 |
| 226 | 226 |
| 227 TEST(UniqueSet_Equals) { | 227 TEST(UniqueSet_Equals) { |
| 228 CcTest::InitializeVM(); | 228 CcTest::InitializeVM(); |
| 229 Isolate* isolate = Isolate::Current(); | 229 Isolate* isolate = CcTest::i_isolate(); |
| 230 Factory* factory = isolate->factory(); | 230 Factory* factory = isolate->factory(); |
| 231 HandleScope sc(isolate); | 231 HandleScope sc(isolate); |
| 232 | 232 |
| 233 Unique<String> A(factory->InternalizeUtf8String("A")); | 233 Unique<String> A(factory->InternalizeUtf8String("A")); |
| 234 Unique<String> B(factory->InternalizeUtf8String("B")); | 234 Unique<String> B(factory->InternalizeUtf8String("B")); |
| 235 Unique<String> C(factory->InternalizeUtf8String("C")); | 235 Unique<String> C(factory->InternalizeUtf8String("C")); |
| 236 | 236 |
| 237 Zone zone(isolate); | 237 Zone zone(isolate); |
| 238 | 238 |
| 239 UniqueSet<String>* set1 = new(&zone) UniqueSet<String>(); | 239 UniqueSet<String>* set1 = new(&zone) UniqueSet<String>(); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 262 CHECK_SETS(set1, set2, false); | 262 CHECK_SETS(set1, set2, false); |
| 263 | 263 |
| 264 set2->Add(B, &zone); | 264 set2->Add(B, &zone); |
| 265 | 265 |
| 266 CHECK_SETS(set1, set2, true); | 266 CHECK_SETS(set1, set2, true); |
| 267 } | 267 } |
| 268 | 268 |
| 269 | 269 |
| 270 TEST(UniqueSet_IsSubset1) { | 270 TEST(UniqueSet_IsSubset1) { |
| 271 CcTest::InitializeVM(); | 271 CcTest::InitializeVM(); |
| 272 Isolate* isolate = Isolate::Current(); | 272 Isolate* isolate = CcTest::i_isolate(); |
| 273 Factory* factory = isolate->factory(); | 273 Factory* factory = isolate->factory(); |
| 274 HandleScope sc(isolate); | 274 HandleScope sc(isolate); |
| 275 | 275 |
| 276 Unique<String> A(factory->InternalizeUtf8String("A")); | 276 Unique<String> A(factory->InternalizeUtf8String("A")); |
| 277 Unique<String> B(factory->InternalizeUtf8String("B")); | 277 Unique<String> B(factory->InternalizeUtf8String("B")); |
| 278 Unique<String> C(factory->InternalizeUtf8String("C")); | 278 Unique<String> C(factory->InternalizeUtf8String("C")); |
| 279 | 279 |
| 280 Zone zone(isolate); | 280 Zone zone(isolate); |
| 281 | 281 |
| 282 UniqueSet<String>* set1 = new(&zone) UniqueSet<String>(); | 282 UniqueSet<String>* set1 = new(&zone) UniqueSet<String>(); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 302 | 302 |
| 303 set1->Add(B, &zone); | 303 set1->Add(B, &zone); |
| 304 | 304 |
| 305 CHECK(set1->IsSubset(set2)); | 305 CHECK(set1->IsSubset(set2)); |
| 306 CHECK(set2->IsSubset(set1)); | 306 CHECK(set2->IsSubset(set1)); |
| 307 } | 307 } |
| 308 | 308 |
| 309 | 309 |
| 310 TEST(UniqueSet_IsSubset2) { | 310 TEST(UniqueSet_IsSubset2) { |
| 311 CcTest::InitializeVM(); | 311 CcTest::InitializeVM(); |
| 312 Isolate* isolate = Isolate::Current(); | 312 Isolate* isolate = CcTest::i_isolate(); |
| 313 Factory* factory = isolate->factory(); | 313 Factory* factory = isolate->factory(); |
| 314 HandleScope sc(isolate); | 314 HandleScope sc(isolate); |
| 315 | 315 |
| 316 Unique<String> A(factory->InternalizeUtf8String("A")); | 316 Unique<String> A(factory->InternalizeUtf8String("A")); |
| 317 Unique<String> B(factory->InternalizeUtf8String("B")); | 317 Unique<String> B(factory->InternalizeUtf8String("B")); |
| 318 Unique<String> C(factory->InternalizeUtf8String("C")); | 318 Unique<String> C(factory->InternalizeUtf8String("C")); |
| 319 Unique<String> D(factory->InternalizeUtf8String("D")); | 319 Unique<String> D(factory->InternalizeUtf8String("D")); |
| 320 Unique<String> E(factory->InternalizeUtf8String("E")); | 320 Unique<String> E(factory->InternalizeUtf8String("E")); |
| 321 Unique<String> F(factory->InternalizeUtf8String("F")); | 321 Unique<String> F(factory->InternalizeUtf8String("F")); |
| 322 Unique<String> G(factory->InternalizeUtf8String("G")); | 322 Unique<String> G(factory->InternalizeUtf8String("G")); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 if ((which & (1 << i)) != 0) set->Add(elements[i], zone); | 354 if ((which & (1 << i)) != 0) set->Add(elements[i], zone); |
| 355 } | 355 } |
| 356 return set; | 356 return set; |
| 357 } | 357 } |
| 358 | 358 |
| 359 | 359 |
| 360 TEST(UniqueSet_IsSubsetExhaustive) { | 360 TEST(UniqueSet_IsSubsetExhaustive) { |
| 361 const int kSetSize = 6; | 361 const int kSetSize = 6; |
| 362 | 362 |
| 363 CcTest::InitializeVM(); | 363 CcTest::InitializeVM(); |
| 364 Isolate* isolate = Isolate::Current(); | 364 Isolate* isolate = CcTest::i_isolate(); |
| 365 Factory* factory = isolate->factory(); | 365 Factory* factory = isolate->factory(); |
| 366 HandleScope sc(isolate); | 366 HandleScope sc(isolate); |
| 367 | 367 |
| 368 Zone zone(isolate); | 368 Zone zone(isolate); |
| 369 | 369 |
| 370 Unique<String> A(factory->InternalizeUtf8String("A")); | 370 Unique<String> A(factory->InternalizeUtf8String("A")); |
| 371 Unique<String> B(factory->InternalizeUtf8String("B")); | 371 Unique<String> B(factory->InternalizeUtf8String("B")); |
| 372 Unique<String> C(factory->InternalizeUtf8String("C")); | 372 Unique<String> C(factory->InternalizeUtf8String("C")); |
| 373 Unique<String> D(factory->InternalizeUtf8String("D")); | 373 Unique<String> D(factory->InternalizeUtf8String("D")); |
| 374 Unique<String> E(factory->InternalizeUtf8String("E")); | 374 Unique<String> E(factory->InternalizeUtf8String("E")); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 386 UniqueSet<String>* set2 = MakeSet(&zone, j, elements); | 386 UniqueSet<String>* set2 = MakeSet(&zone, j, elements); |
| 387 | 387 |
| 388 CHECK(((i & j) == i) == set1->IsSubset(set2)); | 388 CHECK(((i & j) == i) == set1->IsSubset(set2)); |
| 389 } | 389 } |
| 390 } | 390 } |
| 391 } | 391 } |
| 392 | 392 |
| 393 | 393 |
| 394 TEST(UniqueSet_Intersect1) { | 394 TEST(UniqueSet_Intersect1) { |
| 395 CcTest::InitializeVM(); | 395 CcTest::InitializeVM(); |
| 396 Isolate* isolate = Isolate::Current(); | 396 Isolate* isolate = CcTest::i_isolate(); |
| 397 Factory* factory = isolate->factory(); | 397 Factory* factory = isolate->factory(); |
| 398 HandleScope sc(isolate); | 398 HandleScope sc(isolate); |
| 399 | 399 |
| 400 Unique<String> A(factory->InternalizeUtf8String("A")); | 400 Unique<String> A(factory->InternalizeUtf8String("A")); |
| 401 Unique<String> B(factory->InternalizeUtf8String("B")); | 401 Unique<String> B(factory->InternalizeUtf8String("B")); |
| 402 Unique<String> C(factory->InternalizeUtf8String("C")); | 402 Unique<String> C(factory->InternalizeUtf8String("C")); |
| 403 | 403 |
| 404 Zone zone(isolate); | 404 Zone zone(isolate); |
| 405 | 405 |
| 406 UniqueSet<String>* set1 = new(&zone) UniqueSet<String>(); | 406 UniqueSet<String>* set1 = new(&zone) UniqueSet<String>(); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 432 | 432 |
| 433 CHECK_EQ(1, result->size()); | 433 CHECK_EQ(1, result->size()); |
| 434 CHECK(set1->Equals(result)); | 434 CHECK(set1->Equals(result)); |
| 435 } | 435 } |
| 436 | 436 |
| 437 | 437 |
| 438 TEST(UniqueSet_IntersectExhaustive) { | 438 TEST(UniqueSet_IntersectExhaustive) { |
| 439 const int kSetSize = 6; | 439 const int kSetSize = 6; |
| 440 | 440 |
| 441 CcTest::InitializeVM(); | 441 CcTest::InitializeVM(); |
| 442 Isolate* isolate = Isolate::Current(); | 442 Isolate* isolate = CcTest::i_isolate(); |
| 443 Factory* factory = isolate->factory(); | 443 Factory* factory = isolate->factory(); |
| 444 HandleScope sc(isolate); | 444 HandleScope sc(isolate); |
| 445 | 445 |
| 446 Zone zone(isolate); | 446 Zone zone(isolate); |
| 447 | 447 |
| 448 Unique<String> A(factory->InternalizeUtf8String("A")); | 448 Unique<String> A(factory->InternalizeUtf8String("A")); |
| 449 Unique<String> B(factory->InternalizeUtf8String("B")); | 449 Unique<String> B(factory->InternalizeUtf8String("B")); |
| 450 Unique<String> C(factory->InternalizeUtf8String("C")); | 450 Unique<String> C(factory->InternalizeUtf8String("C")); |
| 451 Unique<String> D(factory->InternalizeUtf8String("D")); | 451 Unique<String> D(factory->InternalizeUtf8String("D")); |
| 452 Unique<String> E(factory->InternalizeUtf8String("E")); | 452 Unique<String> E(factory->InternalizeUtf8String("E")); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 468 | 468 |
| 469 CHECK(result->Equals(expected)); | 469 CHECK(result->Equals(expected)); |
| 470 CHECK(expected->Equals(result)); | 470 CHECK(expected->Equals(result)); |
| 471 } | 471 } |
| 472 } | 472 } |
| 473 } | 473 } |
| 474 | 474 |
| 475 | 475 |
| 476 TEST(UniqueSet_Union1) { | 476 TEST(UniqueSet_Union1) { |
| 477 CcTest::InitializeVM(); | 477 CcTest::InitializeVM(); |
| 478 Isolate* isolate = Isolate::Current(); | 478 Isolate* isolate = CcTest::i_isolate(); |
| 479 Factory* factory = isolate->factory(); | 479 Factory* factory = isolate->factory(); |
| 480 HandleScope sc(isolate); | 480 HandleScope sc(isolate); |
| 481 | 481 |
| 482 Unique<String> A(factory->InternalizeUtf8String("A")); | 482 Unique<String> A(factory->InternalizeUtf8String("A")); |
| 483 Unique<String> B(factory->InternalizeUtf8String("B")); | 483 Unique<String> B(factory->InternalizeUtf8String("B")); |
| 484 Unique<String> C(factory->InternalizeUtf8String("C")); | 484 Unique<String> C(factory->InternalizeUtf8String("C")); |
| 485 | 485 |
| 486 Zone zone(isolate); | 486 Zone zone(isolate); |
| 487 | 487 |
| 488 UniqueSet<String>* set1 = new(&zone) UniqueSet<String>(); | 488 UniqueSet<String>* set1 = new(&zone) UniqueSet<String>(); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 514 | 514 |
| 515 CHECK_EQ(3, result->size()); | 515 CHECK_EQ(3, result->size()); |
| 516 CHECK(set2->Equals(result)); | 516 CHECK(set2->Equals(result)); |
| 517 } | 517 } |
| 518 | 518 |
| 519 | 519 |
| 520 TEST(UniqueSet_UnionExhaustive) { | 520 TEST(UniqueSet_UnionExhaustive) { |
| 521 const int kSetSize = 6; | 521 const int kSetSize = 6; |
| 522 | 522 |
| 523 CcTest::InitializeVM(); | 523 CcTest::InitializeVM(); |
| 524 Isolate* isolate = Isolate::Current(); | 524 Isolate* isolate = CcTest::i_isolate(); |
| 525 Factory* factory = isolate->factory(); | 525 Factory* factory = isolate->factory(); |
| 526 HandleScope sc(isolate); | 526 HandleScope sc(isolate); |
| 527 | 527 |
| 528 Zone zone(isolate); | 528 Zone zone(isolate); |
| 529 | 529 |
| 530 Unique<String> A(factory->InternalizeUtf8String("A")); | 530 Unique<String> A(factory->InternalizeUtf8String("A")); |
| 531 Unique<String> B(factory->InternalizeUtf8String("B")); | 531 Unique<String> B(factory->InternalizeUtf8String("B")); |
| 532 Unique<String> C(factory->InternalizeUtf8String("C")); | 532 Unique<String> C(factory->InternalizeUtf8String("C")); |
| 533 Unique<String> D(factory->InternalizeUtf8String("D")); | 533 Unique<String> D(factory->InternalizeUtf8String("D")); |
| 534 Unique<String> E(factory->InternalizeUtf8String("E")); | 534 Unique<String> E(factory->InternalizeUtf8String("E")); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 547 | 547 |
| 548 UniqueSet<String>* result = set1->Union(set2, &zone); | 548 UniqueSet<String>* result = set1->Union(set2, &zone); |
| 549 UniqueSet<String>* expected = MakeSet(&zone, i | j, elements); | 549 UniqueSet<String>* expected = MakeSet(&zone, i | j, elements); |
| 550 | 550 |
| 551 CHECK(result->Equals(expected)); | 551 CHECK(result->Equals(expected)); |
| 552 CHECK(expected->Equals(result)); | 552 CHECK(expected->Equals(result)); |
| 553 } | 553 } |
| 554 } | 554 } |
| 555 } | 555 } |
| 556 | 556 |
| OLD | NEW |