@@ -451,26 +451,26 @@ fn serialize_rgba_two_digit_float_if_roundtrips() {
451
451
fn line_numbers ( ) {
452
452
let mut input = ParserInput :: new ( "foo bar\n baz\r \n \n \" a\\ \r \n b\" " ) ;
453
453
let mut input = Parser :: new ( & mut input) ;
454
- assert_eq ! ( input. current_source_location( ) , SourceLocation { line: 1 , column: 1 } ) ;
454
+ assert_eq ! ( input. current_source_location( ) , SourceLocation { line: 0 , column: 0 } ) ;
455
455
assert_eq ! ( input. next_including_whitespace( ) , Ok ( Token :: Ident ( "foo" . into( ) ) ) ) ;
456
- assert_eq ! ( input. current_source_location( ) , SourceLocation { line: 1 , column: 4 } ) ;
456
+ assert_eq ! ( input. current_source_location( ) , SourceLocation { line: 0 , column: 3 } ) ;
457
457
assert_eq ! ( input. next_including_whitespace( ) , Ok ( Token :: WhiteSpace ( " " ) ) ) ;
458
- assert_eq ! ( input. current_source_location( ) , SourceLocation { line: 1 , column: 5 } ) ;
458
+ assert_eq ! ( input. current_source_location( ) , SourceLocation { line: 0 , column: 4 } ) ;
459
459
assert_eq ! ( input. next_including_whitespace( ) , Ok ( Token :: Ident ( "bar" . into( ) ) ) ) ;
460
- assert_eq ! ( input. current_source_location( ) , SourceLocation { line: 1 , column: 8 } ) ;
460
+ assert_eq ! ( input. current_source_location( ) , SourceLocation { line: 0 , column: 7 } ) ;
461
461
assert_eq ! ( input. next_including_whitespace( ) , Ok ( Token :: WhiteSpace ( "\n " ) ) ) ;
462
- assert_eq ! ( input. current_source_location( ) , SourceLocation { line: 2 , column: 1 } ) ;
462
+ assert_eq ! ( input. current_source_location( ) , SourceLocation { line: 1 , column: 0 } ) ;
463
463
assert_eq ! ( input. next_including_whitespace( ) , Ok ( Token :: Ident ( "baz" . into( ) ) ) ) ;
464
- assert_eq ! ( input. current_source_location( ) , SourceLocation { line: 2 , column: 4 } ) ;
464
+ assert_eq ! ( input. current_source_location( ) , SourceLocation { line: 1 , column: 3 } ) ;
465
465
let position = input. position ( ) ;
466
466
467
467
assert_eq ! ( input. next_including_whitespace( ) , Ok ( Token :: WhiteSpace ( "\r \n \n " ) ) ) ;
468
- assert_eq ! ( input. current_source_location( ) , SourceLocation { line: 4 , column: 1 } ) ;
468
+ assert_eq ! ( input. current_source_location( ) , SourceLocation { line: 3 , column: 0 } ) ;
469
469
470
- assert_eq ! ( input. source_location( position) , SourceLocation { line: 2 , column: 4 } ) ;
470
+ assert_eq ! ( input. source_location( position) , SourceLocation { line: 1 , column: 3 } ) ;
471
471
472
472
assert_eq ! ( input. next_including_whitespace( ) , Ok ( Token :: QuotedString ( "ab" . into( ) ) ) ) ;
473
- assert_eq ! ( input. current_source_location( ) , SourceLocation { line: 5 , column: 3 } ) ;
473
+ assert_eq ! ( input. current_source_location( ) , SourceLocation { line: 4 , column: 2 } ) ;
474
474
assert ! ( input. next_including_whitespace( ) . is_err( ) ) ;
475
475
}
476
476
0 commit comments