|
26 | 26 | import java.io.IOException; |
27 | 27 | import java.util.ArrayList; |
28 | 28 | import java.util.Arrays; |
| 29 | +import java.util.Iterator; |
29 | 30 | import java.util.List; |
| 31 | +import java.util.stream.Stream; |
30 | 32 | /** |
31 | 33 | * The standard implementation of the TestRunner Interface. |
32 | 34 | * |
@@ -200,18 +202,22 @@ protected List<TestRunnerResult<Word<PSymbolInstance>, Word<PSymbolInstance>>> r |
200 | 202 | // This is most likely unintended since it is a wrapper around WordBuilder which is public. |
201 | 203 | // Using that would allow us to skip using WordBuilder directly. |
202 | 204 | // TODO: Open an issue or otherwise notify about this. |
| 205 | + LOGGER.debug("Read mealy tests: {}", tests); |
203 | 206 | WordBuilder<PSymbolInstance> wordBuilder = new WordBuilder<>(); |
204 | 207 | List<Word<PSymbolInstance>> convertedTests = new ArrayList<>(tests.size()); |
| 208 | + PSymbolInstance placeholderElement = new PSymbolInstance(new OutputSymbol("PLACEHOLDER ELEMENT")); |
| 209 | + Iterator<PSymbolInstance> placeholders = Stream.iterate(placeholderElement, i -> placeholderElement).iterator(); |
205 | 210 | for (Word<I> test : tests) { |
206 | 211 | List<PSymbolInstance> wordList = test.stream() |
207 | 212 | .map(inputTransformer::toTransformedInput) |
208 | 213 | .map(p -> new PSymbolInstance(p)) |
| 214 | + .flatMap(x -> Stream.of(x, placeholders.next())) |
209 | 215 | .toList(); |
210 | 216 | Word<PSymbolInstance> pWord = wordBuilder.append(wordList).toWord(); |
211 | 217 | convertedTests.add(pWord); |
212 | 218 | wordBuilder.clear(); |
213 | | - |
214 | 219 | } |
| 220 | + LOGGER.debug("Converted tests: {}", convertedTests); |
215 | 221 |
|
216 | 222 |
|
217 | 223 | List< |
|
0 commit comments