- Timestamp:
- 08/11/14 08:22:13 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/autoquest-core-tasktrees-alignment-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/NumberSequenceTest.java
r1650 r1657 13 13 seq[i] = i; 14 14 } 15 16 int[] seq2 = new int[]{1,5,2,6,5,6,4,5,2,6}; 17 18 int[] seq3 = new int[]{0,0,5,6,0,6,9,10,0,12,13,0,15,16,0,13,0,15,21,13,0,15,21,0,0,0,6,0,9,32,0,5,10,0,6,0,9,32,0,5,43,0,6,0,9,5,6,0,9,43,0,6,0,9,32,0,5,6,6,9,43,0,0,0,0}; 19 15 20 16 21 int[] pat1 = new int[]{2,3,4}; … … 32 37 int[] pat11 = new int[]{5,-1,-1,6}; 33 38 int[] pat12 = new int[]{10,12,12,12}; 39 40 //int[] pat13 = new int[]{6, 0, 6, 9,-1,-1,10,0}; 41 //int[] pat14 = new int[]{6,-1, 9,71,32, 5,10,0}; 34 42 43 int[] pat13 = new int[]{6, 0, 9, 32,0,5,10,0}; 44 int[] pat14 = new int[]{6,-1, 71,32,-1,5,10,0}; 35 45 36 46 NumberSequence ns = new NumberSequence(10); 37 47 ns.setSequence(seq); 38 48 49 NumberSequence ns2 = new NumberSequence(seq3.length); 50 ns2.setSequence(seq3); 51 39 52 NumberSequence firstpattern = new NumberSequence(3); 40 53 NumberSequence secondpattern = new NumberSequence(3); 54 55 NumberSequence thirdpattern = new NumberSequence(4); 56 NumberSequence forthpattern= new NumberSequence(4); 57 58 NumberSequence fifthpattern = new NumberSequence(pat13.length); 59 NumberSequence sixthpattern = new NumberSequence(pat14.length); 60 41 61 firstpattern.setSequence(pat1); 42 62 secondpattern.setSequence(pat2); 43 63 64 thirdpattern.setSequence(pat11); 65 forthpattern.setSequence(pat12); 66 67 fifthpattern.setSequence(pat13); 68 sixthpattern.setSequence(pat14); 69 70 44 71 Match pattern = new Match(); 45 72 pattern.setFirstSequence(firstpattern); 46 pattern.setSecondSequence(secondpattern); 73 pattern.setSecondSequence(secondpattern); 74 75 Match pattern2 = new Match(); 76 pattern2.setFirstSequence(thirdpattern); 77 pattern2.setSecondSequence(forthpattern); 78 79 Match pattern3 = new Match(); 80 pattern3.setFirstSequence(fifthpattern); 81 pattern3.setSecondSequence(sixthpattern); 82 83 /* 47 84 assertEquals(Integer.valueOf(2),ns.containsPattern(pattern).get(0)); 48 85 assertEquals(1,ns.containsPattern(pattern).size()); … … 79 116 assertEquals(Integer.valueOf(5),ns.containsPattern(pattern).get(0)); 80 117 81 118 ns.setSequence(seq2); 119 firstpattern.setSequence(pat3); 120 secondpattern.setSequence(pat4); 121 assertEquals(3,ns.containsPattern(pattern).size()); 122 assertEquals(Integer.valueOf(1),ns.containsPattern(pattern).get(0)); 123 assertEquals(Integer.valueOf(4),ns.containsPattern(pattern).get(1)); 124 assertEquals(Integer.valueOf(7),ns.containsPattern(pattern).get(2)); 125 */ 126 127 assertEquals(2,ns2.containsPattern(pattern3)); 128 assertEquals(2,ns2.containsPattern(pattern3).size()); 129 assertEquals(Integer.valueOf(3),ns.containsPattern(pattern3).get(0)); 130 assertEquals(Integer.valueOf(26),ns.containsPattern(pattern3).get(1)); 131 132 133 82 134 } 83 135
Note: See TracChangeset
for help on using the changeset viewer.