Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

47
LINES

< > BotCompany Repo | #1028123 // test_PatternMaker1

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (15946L/109K).

1  
static PatternMaker1 test_PatternMaker1() {
2  
  PatternMaker1 pm = test_PatternMaker1_1();
3  
  pm.counterexamplesText += "\n" + "Ist das Licht im Flur an?";
4  
  pm.makeStrategy = () -> PatternMaker1_Strategy2(pm);
5  
  pm.think();
6  
  assertNempty(print("Solution", pm.simplestFullSolution));
7  
  mmo2_simplePatternCheck(pm.examplesText, pm.counterexamplesText, pm.simplestFullSolution);
8  
  ret pm;
9  
}
10  
11  
// This one is solved
12  
static PatternMaker1 test_PatternMaker1_1() {
13  
  S examples = [[
14  
    Mache das licht im wohnzimmer nicht an
15  
    Mache das Licht an
16  
    Mache das Licht im Wohnzimmer aus
17  
    Mache
18  
    An
19  
    Aus
20  
    Mache das licht an
21  
    Mache das Licht im flur aus
22  
    Flur aus
23  
    Mache an
24  
    Mache das Licht im flur an
25  
    Licht an
26  
    Mache das licht aus
27  
    licht im flur an
28  
    Mache das licht im flur an und das licht im wohnzimmer aus
29  
    Wohnzimmer an
30  
  ]];
31  
  
32  
  S counterexamples = [[
33  
    Licht
34  
    nicht
35  
    Im Wohnzimmer
36  
    Licht im Flur
37  
    Im Flur
38  
    Wohnzimmer
39  
    Flur
40  
  ]];
41  
  
42  
  PatternMaker1 pm = new(examples, counterexamples);
43  
  pm.think();
44  
  assertEqualsIC(tok_sortCommaListCI("Mache, an, aus"), tok_sortCommaListCI(pm.simplestFullSolution));
45  
  mmo2_simplePatternCheck(examples, counterexamples, pm.simplestFullSolution);
46  
  ret pm;
47  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1028123
Snippet name: test_PatternMaker1
Eternal ID of this version: #1028123/13
Text MD5: 9f72d1f8b6c4e03cebc405a99b682431
Transpilation MD5: 5cf81b830688d1bb68f72930184de415
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-05-20 14:19:48
Source code size: 1295 bytes / 47 lines
Pitched / IR pitched: No / No
Views / Downloads: 202 / 355
Version history: 12 change(s)
Referenced in: [show references]