OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 ASSERT_TRUE(tree.checkInvariants()); | 322 ASSERT_TRUE(tree.checkInvariants()); |
323 tree.remove(tree.createInterval(0, 1)); | 323 tree.remove(tree.createInterval(0, 1)); |
324 ASSERT_TRUE(tree.checkInvariants()); | 324 ASSERT_TRUE(tree.checkInvariants()); |
325 tree.remove(tree.createInterval(4, 5)); | 325 tree.remove(tree.createInterval(4, 5)); |
326 ASSERT_TRUE(tree.checkInvariants()); | 326 ASSERT_TRUE(tree.checkInvariants()); |
327 tree.remove(tree.createInterval(4, 12)); | 327 tree.remove(tree.createInterval(4, 12)); |
328 ASSERT_TRUE(tree.checkInvariants()); | 328 ASSERT_TRUE(tree.checkInvariants()); |
329 } | 329 } |
330 | 330 |
331 TEST(PODIntervalTreeTest, RandomDeletionAndInsertionRegressionTest4) { | 331 TEST(PODIntervalTreeTest, RandomDeletionAndInsertionRegressionTest4) { |
332 // Even further reduced test case for RandomDeletionAndInsertionRegressionTest
3. | 332 // Even further reduced test case for |
| 333 // RandomDeletionAndInsertionRegressionTest3. |
333 PODIntervalTree<int> tree; | 334 PODIntervalTree<int> tree; |
334 tree.add(tree.createInterval(0, 5)); | 335 tree.add(tree.createInterval(0, 5)); |
335 ASSERT_TRUE(tree.checkInvariants()); | 336 ASSERT_TRUE(tree.checkInvariants()); |
336 tree.add(tree.createInterval(8, 9)); | 337 tree.add(tree.createInterval(8, 9)); |
337 ASSERT_TRUE(tree.checkInvariants()); | 338 ASSERT_TRUE(tree.checkInvariants()); |
338 tree.add(tree.createInterval(1, 4)); | 339 tree.add(tree.createInterval(1, 4)); |
339 ASSERT_TRUE(tree.checkInvariants()); | 340 ASSERT_TRUE(tree.checkInvariants()); |
340 tree.add(tree.createInterval(3, 5)); | 341 tree.add(tree.createInterval(3, 5)); |
341 ASSERT_TRUE(tree.checkInvariants()); | 342 ASSERT_TRUE(tree.checkInvariants()); |
342 tree.add(tree.createInterval(4, 12)); | 343 tree.add(tree.createInterval(4, 12)); |
343 ASSERT_TRUE(tree.checkInvariants()); | 344 ASSERT_TRUE(tree.checkInvariants()); |
344 tree.remove(tree.createInterval(4, 12)); | 345 tree.remove(tree.createInterval(4, 12)); |
345 ASSERT_TRUE(tree.checkInvariants()); | 346 ASSERT_TRUE(tree.checkInvariants()); |
346 } | 347 } |
347 | 348 |
348 } // namespace blink | 349 } // namespace blink |
OLD | NEW |