summaryrefslogtreecommitdiff
path: root/check.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2015-11-22 15:17:23 -0800
committerAlon Zakai <alonzakai@gmail.com>2015-11-22 15:17:23 -0800
commit45a011e1071ba511b3deee134219dd2f9eb6c8aa (patch)
tree40f5cdc0b7f8490e149d0567ae5afcd7abf2fbaa /check.py
parent295c4718d924f5d31e1bd25fe63add1833cc9c98 (diff)
downloadbinaryen-45a011e1071ba511b3deee134219dd2f9eb6c8aa.tar.gz
binaryen-45a011e1071ba511b3deee134219dd2f9eb6c8aa.tar.bz2
binaryen-45a011e1071ba511b3deee134219dd2f9eb6c8aa.zip
improve interpreter error printing
Diffstat (limited to 'check.py')
-rwxr-xr-xcheck.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/check.py b/check.py
index b3978f739..ef7a7fed4 100755
--- a/check.py
+++ b/check.py
@@ -62,12 +62,13 @@ for asm in tests:
reported = err.split(':')[1]
start, end = reported.split('-')
start_line, start_col = map(int, start.split('.'))
- lines = expected.split('\n')
+ lines = open('temp.wast').read().split('\n')
+ print start_line, start_col
print
print '='*80
print lines[start_line-1]
print (' '*(start_col-1)) + '^'
- print (' '*(start_col-1)) + '|'
+ print (' '*(start_col-2)) + '/_\\'
print '='*80
print err
except Exception, e: