aboutsummaryrefslogtreecommitdiff
path: root/test/MC
diff options
context:
space:
mode:
authorEli Bendersky <eliben@google.com>2013-03-01 20:54:00 +0000
committerEli Bendersky <eliben@google.com>2013-03-01 20:54:00 +0000
commitdf861b3ac4521814903ec39787f5f24c1a79b6a3 (patch)
treec82d50213b64a80d8277127618d9655bc41e7546 /test/MC
parent4385988d26a1e796cc3b2ce1b15ea077a7ee35ac (diff)
Rewrite a test to check actual output rather than intermediate implementation
detail. The was this test was written, it was relying on an implementation detail (fixups) and hence was very brittle (relying, among other things, on the exact ordering of statistics printed by MC). The test was rewritten to check a more observable output difference. While it doesn't cover 100% of the things the original test covered, it's a good practice to write regression tests this way. If we want to check that internal details and invariants hold, such tests should be expressed as unit tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176377 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC')
-rw-r--r--test/MC/ELF/no-fixup.s12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/MC/ELF/no-fixup.s b/test/MC/ELF/no-fixup.s
index 8cc299fb24..9d3489262f 100644
--- a/test/MC/ELF/no-fixup.s
+++ b/test/MC/ELF/no-fixup.s
@@ -1,11 +1,11 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o %t -stats 2>%t.out
-// RUN: FileCheck --input-file=%t.out %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o %t
+// RUN: llvm-objdump -r %t | FileCheck %s
-// Test that we create no fixups for this file since "a" and "b" are in the
-// same fragment.
+// Test that we create no fixups for this file since "a" and "b"
+// are in the same fragment. If b was in a different section, a
+// fixup causing a relocation would be generated in the object file.
-// CHECK: assembler - Number of emitted object file bytes
-// CHECK-NEXT: assembler - Number of fragment layouts
+// CHECK-NOT: RELOCATION RECORDS
a:
nop