Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Unified Diff: tests_lit/parse_errs/duplicate-fcn-name.test

Issue 1347683003: Check that symbol names in symbol tables are unique. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nit. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests_lit/parse_errs/Inputs/duplicate-fcn-name.tbc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests_lit/parse_errs/duplicate-fcn-name.test
diff --git a/tests_lit/parse_errs/duplicate-fcn-name.test b/tests_lit/parse_errs/duplicate-fcn-name.test
new file mode 100644
index 0000000000000000000000000000000000000000..2ff1a6cc2e5402b3dd40e2bafd6d78540dc29be7
--- /dev/null
+++ b/tests_lit/parse_errs/duplicate-fcn-name.test
@@ -0,0 +1,40 @@
+; Test if we detect duplicate names in a symbol table.
+
+; REQUIRES: no_minimal_build
+
+; RUN: not %pnacl_sz -bitcode-as-text %p/Inputs/duplicate-fcn-name.tbc \
+; RUN: -bitcode-format=pnacl -notranslate -no-ir-gen -build-on-read 2>&1 \
+; RUN: | FileCheck %s
+
+; CHECK: Module valuesymtab defines duplicate value name: 'f'
+
+; RUN: pnacl-bcfuzz -bitcode-as-text %p/Inputs/duplicate-fcn-name.tbc -output - \
+; RUN: | pnacl-bcdis -no-records | FileCheck -check-prefix=ASM %s
+
+; ASM: module { // BlockID = 8
+; ASM: version 1;
+; ASM: types { // BlockID = 17
+; ASM: count 2;
+; ASM: @t0 = void;
+; ASM: @t1 = void ();
+; ASM: }
+; ASM: define external void @f0();
+; ASM: define external void @f1();
+; ASM: globals { // BlockID = 19
+; ASM: count 0;
+; ASM: }
+; ASM: valuesymtab { // BlockID = 14
+; ASM: @f0 : "f";
+; ASM: @f1 : "f";
+; ASM: }
+; ASM: function void @f0() { // BlockID = 12
+; ASM: blocks 1;
+; ASM: %b0:
+; ASM: ret void;
+; ASM: }
+; ASM: function void @f1() { // BlockID = 12
+; ASM: blocks 1;
+; ASM: %b0:
+; ASM: ret void;
+; ASM: }
+; ASM: }
« no previous file with comments | « tests_lit/parse_errs/Inputs/duplicate-fcn-name.tbc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698