OSDN Git Service

Remove test that is now invalid.
authorNicolas Geoffray <ngeoffray@google.com>
Fri, 16 Jan 2015 09:04:49 +0000 (09:04 +0000)
committerNicolas Geoffray <ngeoffray@google.com>
Fri, 16 Jan 2015 09:08:07 +0000 (09:08 +0000)
It does not make sense to have moves to the same destination
within a single parallel move. There is now an explicit
DCHECK to prevent these situations.

Change-Id: I3a33e748579ecb53b95476e77a37164d2f145f5a

compiler/optimizing/parallel_move_test.cc

index 210f7d7..7ab41b6 100644 (file)
@@ -120,16 +120,9 @@ TEST(ParallelMoveTest, Swap) {
 
   {
     TestParallelMoveResolver resolver(&allocator);
-    static constexpr size_t moves[][2] = {{0, 1}, {1, 2}, {2, 3}, {3, 4}, {4, 1}};
+    static constexpr size_t moves[][2] = {{0, 1}, {1, 2}, {2, 3}, {3, 4}, {4, 0}};
     resolver.EmitNativeCode(BuildParallelMove(&allocator, moves, arraysize(moves)));
-    ASSERT_STREQ("(4 <-> 1) (3 <-> 4) (2 <-> 3) (0 -> 1)", resolver.GetMessage().c_str());
-  }
-
-  {
-    TestParallelMoveResolver resolver(&allocator);
-    static constexpr size_t moves[][2] = {{0, 1}, {1, 2}, {2, 3}, {3, 4}, {4, 1}, {5, 4}};
-    resolver.EmitNativeCode(BuildParallelMove(&allocator, moves, arraysize(moves)));
-    ASSERT_STREQ("(4 <-> 1) (3 <-> 4) (2 <-> 3) (0 -> 1) (5 -> 4)", resolver.GetMessage().c_str());
+    ASSERT_STREQ("(4 <-> 0) (3 <-> 4) (2 <-> 3) (1 <-> 2)", resolver.GetMessage().c_str());
   }
 }