Merge pull request #270 from vmg/vmg/fixes

Bytes/C Fixes
This commit is contained in:
Max Brunsfeld 2019-02-06 10:41:41 -08:00 committed by GitHub
commit db8de605e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 63 additions and 40 deletions

View file

@ -40,7 +40,7 @@ fn test_walk_with_properties_with_nth_child() {
parser.set_language(language).unwrap();
let tree = parser.parse(source_code, None).unwrap();
let mut cursor = tree.walk_with_properties(&property_sheet, source_code);
let mut cursor = tree.walk_with_properties(&property_sheet, source_code.as_bytes());
assert_eq!(cursor.node().kind(), "program");
assert!(cursor.goto_first_child());
assert_eq!(cursor.node().kind(), "expression_statement");
@ -98,7 +98,7 @@ fn test_walk_with_properties_with_regexes() {
parser.set_language(language).unwrap();
let tree = parser.parse(source_code, None).unwrap();
let mut cursor = tree.walk_with_properties(&property_sheet, source_code);
let mut cursor = tree.walk_with_properties(&property_sheet, source_code.as_bytes());
assert_eq!(cursor.node().kind(), "program");
assert!(cursor.goto_first_child());
assert_eq!(cursor.node().kind(), "lexical_declaration");