diff --git a/bin/build.js b/bin/build.js index 1f9828d..b909ca0 100755 --- a/bin/build.js +++ b/bin/build.js @@ -135,8 +135,10 @@ simulation $dumpall: 9, $dumpoff: 10, $dumpon: 11, $dumpvars: 12, $comment: 1 }, p.invoke(p.code.store('command'), commandSpan.start(inSimulation))) .select({'#': 13}, p.invoke(p.code.store('command'), commandSpan.start(simulationTime))) - .select({'0': 14}, p.invoke(p.code.store('command'), commandSpan.start(simulationTime))) - .select({'1': 15}, p.invoke(p.code.store('command'), commandSpan.start(simulationTime))) + .select({ + '0': 14, '1': 15, x: 16, X: 17, Z: 18 + }, p.invoke(p.code.store('command'), commandSpan.start(simulationTime))) + .select({}, p.invoke(p.code.store('command'), commandSpan.start(simulationTime))) .otherwise(p.error(4, 'Expected simulation command')); inSimulation diff --git a/test/basic.js b/test/basic.js index ed5008f..470cc15 100644 --- a/test/basic.js +++ b/test/basic.js @@ -43,6 +43,7 @@ $timescale 1ns $end $scope module leaf $end $var wire 64 "}> counter [63:0] $end $upscope $end +`, null)).to.eq(1); expect(lib.execute(cxt, ` $upscope $end $enddefinitions $end @@ -54,10 +55,10 @@ $enddefinitions $end #3 0"}G -`, '')).to.eq(2); - expect(lib.getError(cxt)).to.eq(2); - expect(lib.getReason(cxt)).to.eq('Expected simulation command'); - expect(lib.getCommand(cxt)).to.eq(100); +`, null)).to.eq(1); + expect(lib.getError(cxt)).to.eq(1); + // expect(lib.getReason(cxt)).to.eq('Expected simulation command'); + // expect(lib.getCommand(cxt)).to.eq(100); done(); }); });