[Bitcode] Diagnose errors instead of asserting from bad input
[oota-llvm.git] / test / Bitcode / invalid.test
1 RUN: not llvm-dis -disable-output %p/Inputs/invalid-pr20485.bc 2>&1 | \
2 RUN:   FileCheck --check-prefix=INVALID-ENCODING %s
3 RUN: not llvm-dis -disable-output %p/Inputs/invalid-abbrev.bc 2>&1 | \
4 RUN:   FileCheck --check-prefix=BAD-ABBREV %s
5 RUN: not llvm-dis -disable-output %p/Inputs/invalid-unexpected-eof.bc 2>&1 | \
6 RUN:   FileCheck --check-prefix=UNEXPECTED-EOF %s
7 RUN: not llvm-dis -disable-output %p/Inputs/invalid-bad-abbrev-number.bc 2>&1 | \
8 RUN:   FileCheck --check-prefix=BAD-ABBREV-NUMBER %s
9
10 INVALID-ENCODING: Invalid encoding
11 BAD-ABBREV: Abbreviation starts with an Array or a Blob
12 UNEXPECTED-EOF: Unexpected end of file
13 BAD-ABBREV-NUMBER: Invalid abbrev number