1 | svoid test_EnglishNumberAttractor() {
|
2 | test_EnglishNumberAttractor("i want twenty two ice cones", "twenty two", "22");
|
3 | // test_EnglishNumberAttractor("i want twenty two million ice cones", "twenty two million", "22000000"); // bug in parseEnglishNumbers
|
4 | test_EnglishNumberAttractor("three are enough for everyone", "three", "3");
|
5 | } |
6 | |
7 | svoid test_EnglishNumberAttractor(S input, S textual, S digits) {
|
8 | EnglishNumberAttractor a = cast getSingleton(pAttractor_allMatches2(new EnglishNumberAttractor, javaTok(input))); |
9 | assertEqualsVerbose(textual, a.matchedString()); |
10 | assertEqualsVerbose(digits, a.value); |
11 | } |
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1022881 |
| Snippet name: | test_EnglishNumberAttractor |
| Eternal ID of this version: | #1022881/3 |
| Text MD5: | 6edbf301b36fa06fcd4f024a2ec4de41 |
| Author: | stefan |
| Category: | javax / a.i. |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2019-04-12 17:34:49 |
| Source code size: | 622 bytes / 11 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 486 / 520 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |