Skip to content
This repository was archived by the owner on Apr 14, 2020. It is now read-only.

Commit b1db5b7

Browse files
committed
Fixed parser tests getting caught by the search and replace
1 parent e33ca10 commit b1db5b7

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

parser.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -1240,13 +1240,13 @@ fn test_operators() {
12401240
#[test]
12411241
fn parse_instance_class() {
12421242
let mut parser = Parser::new(
1243-
r"class Eq a where_bindings
1243+
r"class Eq a where
12441244
(==) :: a -> a -> Bool
12451245
(/=) x y = not (x == y)
12461246
(/=) :: a -> a -> Bool
12471247
12481248
1249-
instance Eq a => Eq [a] where_bindings
1249+
instance Eq a => Eq [a] where
12501250
(==) xs ys = undefined".chars());
12511251
let module = parser.module();
12521252

@@ -1262,7 +1262,7 @@ instance Eq a => Eq [a] where_bindings
12621262
#[test]
12631263
fn parse_super_class() {
12641264
let mut parser = Parser::new(
1265-
r"class Eq a => Ord a where_bindings
1265+
r"class Eq a => Ord a where
12661266
(<) :: a -> a -> Bool
12671267
12681268
".chars());
@@ -1403,20 +1403,20 @@ fn where_bindings() {
14031403
r"
14041404
test = case a of
14051405
x:y:xs -> z
1406-
where_bindings
1406+
where
14071407
z = x + y
14081408
x:xs -> x
14091409
[] -> z
1410-
where_bindings z = 0
1411-
where_bindings
1410+
where z = 0
1411+
where
14121412
a = []
14131413
".chars());
14141414
let bind = parser.binding();
14151415
match bind.matches {
14161416
Match::Simple(ref e) => {
14171417
match e.expr {
14181418
Case(_, ref alts) => {
1419-
let w = alts[0].where_bindings.as_ref().expect("Expected where_bindings");
1419+
let w = alts[0].where_bindings.as_ref().expect("Expected where");
14201420
assert_eq!(w[0].name, intern("z"));
14211421
assert_eq!(w[0].matches, Match::Simple(op_apply(identifier("x"), intern("+"), identifier("y"))));
14221422
let w2 = alts[2].where_bindings.as_ref().expect("Expected where_bindings");

0 commit comments

Comments
 (0)