Explorar o código

HPCC-8453 Add dictionary tests to regression suite

Make dict15b.ecl run faster.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman %!s(int64=12) %!d(string=hai) anos
pai
achega
9b5c2da91a
Modificáronse 2 ficheiros con 2 adicións e 10 borrados
  1. 2 2
      testing/ecl/dict15b.ecl
  2. 0 8
      testing/ecl/key/dict15b.xml

+ 2 - 2
testing/ecl/dict15b.ecl

@@ -18,7 +18,7 @@
 //UseStandardFiles
 //Find all anagrams of a word, that match the list of known words
 
-allWordsDs := DEDUP(SORTED(TS_wordIndex), word);
+allWordsDs := DEDUP(SORTED(TS_wordIndex(word[1]='t'), word), word);  // Restrict to words starting T for speed
 
 knownWords := DICTIONARY(allWordsDs, { word });
 
@@ -43,7 +43,7 @@ findAnagrams(string searchWord) := FUNCTION
   RETURN uniqueAnagrams(Word in knownWords);
 END;
 
-shortWords := TABLE(allWordsDs, { Word })(LENGTH(TRIM(Word)) <= 6); 
+shortWords := TABLE(allWordsDs, { Word })(LENGTH(TRIM(Word)) <= 5);
 
 //BUG: Without the NOFOLD the code generator merges the projects, and introduces an ambiguous dataset
 moreThanOne := NOFOLD(shortWords)(count(findAnagrams(Word))>1);

+ 0 - 8
testing/ecl/key/dict15b.xml

@@ -1,12 +1,4 @@
 <Dataset name='Result 1'>
- <Row><word>course              </word></Row>
- <Row><word>gch01               </word></Row>
- <Row><word>gch02               </word></Row>
- <Row><word>gch10               </word></Row>
- <Row><word>gch20               </word></Row>
- <Row><word>how                 </word></Row>
- <Row><word>source              </word></Row>
  <Row><word>there               </word></Row>
  <Row><word>three               </word></Row>
- <Row><word>who                 </word></Row>
 </Dataset>