@@ -451,26 +451,26 @@ fn serialize_rgba_two_digit_float_if_roundtrips() {
451451fn line_numbers ( ) {
452452 let mut input = ParserInput :: new ( "foo bar\n baz\r \n \n \" a\\ \r \n b\" " ) ;
453453 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 } ) ;
455455 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 } ) ;
457457 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 } ) ;
459459 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 } ) ;
461461 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 } ) ;
463463 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 } ) ;
465465 let position = input. position ( ) ;
466466
467467 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 } ) ;
469469
470- assert_eq ! ( input. source_location( position) , SourceLocation { line: 2 , column: 4 } ) ;
470+ assert_eq ! ( input. source_location( position) , SourceLocation { line: 1 , column: 3 } ) ;
471471
472472 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 } ) ;
474474 assert ! ( input. next_including_whitespace( ) . is_err( ) ) ;
475475}
476476
0 commit comments