Update error messages

This commit is contained in:
2019-01-27 01:56:38 -05:00
parent 86e128d034
commit 26b5958dbb
3 changed files with 8 additions and 2 deletions

1
.gitignore vendored
View File

@@ -1,3 +1,4 @@
examples/shave/
examples/petIntersection/
transcript.hlog
validating.hlog

View File

@@ -28,6 +28,10 @@ class HankLine {
this.id = id;
this.type = type;
}
public function toString() {
return '${id.toString()}: ${type}';
}
}
enum LineType {

View File

@@ -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}');