Skip to content

Commit 70634c0

Browse files
committed
rename Parser prefix(), postfix() to withPrefixes() and withPostfixes()
1 parent 07dde33 commit 70634c0

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

dot-parse/src/test/java/com/google/common/labs/parse/ParserTest.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3242,7 +3242,7 @@ public void chars_skipping() {
32423242
}
32433243

32443244
@Test
3245-
public void prefix_zeroOperator_success() {
3245+
public void withPrefixes_zeroOperator_success() {
32463246
Parser<Integer> number = digits().map(Integer::parseInt);
32473247
Parser<UnaryOperator<Integer>> neg = string("-").thenReturn(i -> -i);
32483248
Parser<Integer> parser = number.withPrefixes(neg);
@@ -3252,7 +3252,7 @@ public void prefix_zeroOperator_success() {
32523252
}
32533253

32543254
@Test
3255-
public void prefix_zeroOperator_success_source() {
3255+
public void withPrefixes_zeroOperator_success_source() {
32563256
Parser<Integer> number = digits().map(Integer::parseInt);
32573257
Parser<UnaryOperator<Integer>> neg = string("-").thenReturn(i -> -i);
32583258
Parser<Integer> parser = number.withPrefixes(neg);
@@ -3262,7 +3262,7 @@ public void prefix_zeroOperator_success_source() {
32623262
}
32633263

32643264
@Test
3265-
public void prefix_oneOperator_success() {
3265+
public void withPrefixes_oneOperator_success() {
32663266
Parser<Integer> number = digits().map(Integer::parseInt);
32673267
Parser<UnaryOperator<Integer>> neg = string("-").thenReturn(i -> -i);
32683268
Parser<Integer> parser = number.withPrefixes(neg);
@@ -3271,7 +3271,7 @@ public void prefix_oneOperator_success() {
32713271
}
32723272

32733273
@Test
3274-
public void prefix_oneOperator_success_source() {
3274+
public void withPrefixes_oneOperator_success_source() {
32753275
Parser<Integer> number = digits().map(Integer::parseInt);
32763276
Parser<UnaryOperator<Integer>> neg = string("-").thenReturn(i -> -i);
32773277
Parser<Integer> parser = number.withPrefixes(neg);
@@ -3280,7 +3280,7 @@ public void prefix_oneOperator_success_source() {
32803280
}
32813281

32823282
@Test
3283-
public void prefix_multipleOperators_success() {
3283+
public void withPrefixes_multipleOperators_success() {
32843284
Parser<Integer> number = digits().map(Integer::parseInt);
32853285
Parser<UnaryOperator<Integer>> neg = string("-").thenReturn(i -> -i);
32863286
Parser<UnaryOperator<Integer>> plus = string("+").thenReturn(i -> i);
@@ -3298,7 +3298,7 @@ public void prefix_multipleOperators_success() {
32983298
}
32993299

33003300
@Test
3301-
public void prefix_multipleOperators_success_source() {
3301+
public void withPrefixes_multipleOperators_success_source() {
33023302
Parser<Integer> number = digits().map(Integer::parseInt);
33033303
Parser<UnaryOperator<Integer>> neg = string("-").thenReturn(i -> -i);
33043304
Parser<UnaryOperator<Integer>> plus = string("+").thenReturn(i -> i);
@@ -3316,7 +3316,7 @@ public void prefix_multipleOperators_success_source() {
33163316
}
33173317

33183318
@Test
3319-
public void prefix_operandParseFails() {
3319+
public void withPrefixes_operandParseFails() {
33203320
Parser<Integer> number = digits().map(Integer::parseInt);
33213321
Parser<UnaryOperator<Integer>> neg = string("-").thenReturn(i -> -i);
33223322
Parser<Integer> parser = number.withPrefixes(neg);
@@ -3327,7 +3327,7 @@ public void prefix_operandParseFails() {
33273327
}
33283328

33293329
@Test
3330-
public void prefix_failure_withLeftover() {
3330+
public void withPrefixes_failure_withLeftover() {
33313331
Parser<Integer> number = digits().map(Integer::parseInt);
33323332
Parser<UnaryOperator<Integer>> neg = string("-").thenReturn(i -> -i);
33333333
Parser<Integer> parser = number.withPrefixes(neg);
@@ -3338,7 +3338,7 @@ public void prefix_failure_withLeftover() {
33383338
}
33393339

33403340
@Test
3341-
public void postfix_success() {
3341+
public void withPostfixes_success() {
33423342
Parser<Integer> number = digits().map(Integer::parseInt);
33433343
Parser<UnaryOperator<Integer>> inc = string("++").thenReturn(i -> i + 1);
33443344
Parser<UnaryOperator<Integer>> dec = string("--").thenReturn(i -> i - 1);
@@ -3356,7 +3356,7 @@ public void postfix_success() {
33563356
}
33573357

33583358
@Test
3359-
public void postfix_success_source() {
3359+
public void withPostfixes_success_source() {
33603360
Parser<Integer> number = digits().map(Integer::parseInt);
33613361
Parser<UnaryOperator<Integer>> inc = string("++").thenReturn(i -> i + 1);
33623362
Parser<UnaryOperator<Integer>> dec = string("--").thenReturn(i -> i - 1);
@@ -3374,7 +3374,7 @@ public void postfix_success_source() {
33743374
}
33753375

33763376
@Test
3377-
public void postfix_failure() {
3377+
public void withPostfixes_failure() {
33783378
Parser<Integer> number = digits().map(Integer::parseInt);
33793379
Parser<UnaryOperator<Integer>> inc = string("++").thenReturn(i -> i + 1);
33803380
Parser<UnaryOperator<Integer>> dec = string("--").thenReturn(i -> i - 1);
@@ -3387,7 +3387,7 @@ public void postfix_failure() {
33873387
}
33883388

33893389
@Test
3390-
public void postfix_failure_withLeftover() {
3390+
public void withPostfixes_failure_withLeftover() {
33913391
Parser<Integer> number = digits().map(Integer::parseInt);
33923392
Parser<UnaryOperator<Integer>> inc = string("++").thenReturn(i -> i + 1);
33933393
Parser<UnaryOperator<Integer>> dec = string("--").thenReturn(i -> i - 1);
@@ -3400,7 +3400,7 @@ public void postfix_failure_withLeftover() {
34003400
}
34013401

34023402
@Test
3403-
public void postfix_withBiFunction_success() {
3403+
public void withPostfixes_withBiFunction_success() {
34043404
Parser<Integer> parser =
34053405
digits().map(Integer::parseInt).withPostfixes(string("++").map(s -> 1), (a, b) -> a + b);
34063406
assertThat(parser.parse("10")).isEqualTo(10);
@@ -3409,7 +3409,7 @@ public void postfix_withBiFunction_success() {
34093409
}
34103410

34113411
@Test
3412-
public void postfix_withBiFunction_failure() {
3412+
public void withPostfixes_withBiFunction_failure() {
34133413
Parser<Integer> parser =
34143414
digits().map(Integer::parseInt).withPostfixes(string("!").map(s -> 1), (a, b) -> a + b);
34153415
assertThrows(ParseException.class, () -> parser.parse("10!a"));

0 commit comments

Comments
 (0)