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

Unified Diff: unittests/Bitcode/NaClParseTypesTest.cpp

Issue 932953002: Fix the NaCl bitstream reader to report fatal errors. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Patch Set: Merge with master Created 5 years, 10 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 | « unittests/Bitcode/NaClParseInstsTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: unittests/Bitcode/NaClParseTypesTest.cpp
diff --git a/unittests/Bitcode/NaClParseTypesTest.cpp b/unittests/Bitcode/NaClParseTypesTest.cpp
index 6782722f64d6975264aa7a68d1439470adc0a0f5..68efad821f8dad6c0644fe19af584f5523486f45 100644
--- a/unittests/Bitcode/NaClParseTypesTest.cpp
+++ b/unittests/Bitcode/NaClParseTypesTest.cpp
@@ -39,15 +39,19 @@ TEST(NaClParseTypesTest, BadTypeReferences) {
// Show text of base input.
NaClObjDumpMunger BaseMunger(BitcodeRecords,
array_lengthof(BitcodeRecords), Terminator);
- EXPECT_TRUE(BaseMunger.runTestForAssembly("Bad type references base"));
+ EXPECT_TRUE(BaseMunger.runTest("Bad type references base"));
EXPECT_EQ(
- "module { // BlockID = 8\n"
- " types { // BlockID = 17\n"
- " count 2;\n"
- " @t0 = i32;\n"
- " @t1 = float;\n"
- " }\n"
- "}\n",
+ " 0:0|<65532, 80, 69, 88, 69, 1, 0,|Magic Number: 'PEXE' (80, 69, "
+ "88, 69)\n"
+ " | 8, 0, 17, 0, 4, 0, 2, 0, 0, |PNaCl Version: 2\n"
+ " | 0> |\n"
+ " 16:0|1: <65535, 8, 2> |module { // BlockID = 8\n"
+ " 24:0| 1: <65535, 17, 2> | types { // BlockID = 17\n"
+ " 32:0| 3: <1, 2> | count 2;\n"
+ " 34:4| 3: <7, 32> | @t0 = i32;\n"
+ " 37:6| 3: <3> | @t1 = float;\n"
+ " 39:4| 0: <65534> | }\n"
+ " 40:0|0: <65534> |}\n",
BaseMunger.getTestResults());
// Show that we successfully parse the base input.
@@ -74,7 +78,7 @@ TEST(NaClParseTypesTest, BadTypeReferences) {
AddSelfReference, array_lengthof(AddSelfReference),
true));
EXPECT_EQ(
- "Error: (24:2) Invalid TYPE_CODE_FLOAT record\n"
+ "Error: (40:2) Invalid TYPE_CODE_FLOAT record\n"
"Error: Record doesn't have expected size or structure\n",
Munger.getTestResults());
}
« no previous file with comments | « unittests/Bitcode/NaClParseInstsTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698