diff --git a/.gitignore b/.gitignore index 73285d0..5cbfd86 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ examples/shave/ +examples/petIntersection/ transcript.hlog validating.hlog \ No newline at end of file diff --git a/hank/HankLines.hx b/hank/HankLines.hx index 102b283..05710fc 100644 --- a/hank/HankLines.hx +++ b/hank/HankLines.hx @@ -28,6 +28,10 @@ class HankLine { this.id = id; this.type = type; } + + public function toString() { + return '${id.toString()}: ${type}'; + } } enum LineType { diff --git a/hank/StoryTestCase.hx b/hank/StoryTestCase.hx index 4838a63..ddf7a16 100644 --- a/hank/StoryTestCase.hx +++ b/hank/StoryTestCase.hx @@ -38,6 +38,7 @@ class StoryTestCase extends utest.Test { frame = story.nextFrame(); } catch (e: Dynamic) { trace('Error at ${story.lastLineID} while validating ${transcriptFile}'); + trace(Std.string(story.scriptLines[story.currentLineIdx])); throw e; } @@ -73,10 +74,10 @@ class StoryTestCase extends utest.Test { var firstColonIdx = line.indexOf(':'); var index = Std.parseInt(line.substr(0, firstColonIdx))-1; var expectedOutput = StringTools.trim(line.substr(firstColonIdx+1)); - trace('expecting: ${expectedOutput}'); + // trace('expecting: ${expectedOutput}'); try { var output = story.choose(index); - trace('got: ${output}'); + // trace('got: ${output}'); Assert.equals(expectedOutput, output); } catch (e: Dynamic) { trace('Error at ${story.lastLineID} while validating ${transcriptFile}');