Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

Commit

Permalink
Lines should be 1-indexed
Browse files Browse the repository at this point in the history
  • Loading branch information
athei committed Sep 15, 2021
1 parent c69f8a2 commit 0353803
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions testsuite/src/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub fn check(path: &str) {
match kind {
WastDirective::Module(mut module) => {
let (line, _col) = module.span.linecol_in(&source);
println!("Parsing module at line {}", line);
println!("Parsing module at line {}", line + 1);
let orig_bytes = module.encode().unwrap();
let parsed =
deserialize_buffer::<Module>(&orig_bytes).expect("Failed to parse module");
Expand All @@ -25,7 +25,7 @@ pub fn check(path: &str) {
span,
} => {
let (line, _col) = span.linecol_in(&source);
println!("Parsing assert_malformed at line {}", line);
println!("Parsing assert_malformed at line {}", line + 1);
let parsed = deserialize_buffer::<Module>(&module.encode().unwrap());
if parsed.is_ok() {
panic!("Module should be malformed because: {}", message);
Expand Down

0 comments on commit 0353803

Please sign in to comment.