mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2024-06-16 12:29:28 +00:00
fixed some tests
This commit is contained in:
parent
3ff3789bf8
commit
b171def11a
|
@ -38,7 +38,7 @@ var includeInThisContext = function(path) {
|
||||||
vm.runInThisContext(code, path);
|
vm.runInThisContext(code, path);
|
||||||
};
|
};
|
||||||
|
|
||||||
includeInThisContext("gen/worker/assembler.js");
|
var assembler = require("gen/worker/assembler.js");
|
||||||
|
|
||||||
describe('Assemble', function() {
|
describe('Assemble', function() {
|
||||||
it('Should assemble', function() {
|
it('Should assemble', function() {
|
||||||
|
@ -76,7 +76,7 @@ WaitVsync:
|
||||||
sta 0
|
sta 0
|
||||||
jmp DisplayLoop
|
jmp DisplayLoop
|
||||||
`;
|
`;
|
||||||
var asm = new Assembler(EXAMPLE_SPEC);
|
var asm = new assembler.Assembler(EXAMPLE_SPEC);
|
||||||
var result = asm.assembleFile(source);
|
var result = asm.assembleFile(source);
|
||||||
//console.log(result);
|
//console.log(result);
|
||||||
//assert.equal(result, {});
|
//assert.equal(result, {});
|
||||||
|
|
|
@ -19,12 +19,13 @@ global['$'] = require("jquery/jquery-2.2.3.min.js");
|
||||||
includeInThisContext("javatari.js/release/javatari/javatari.js");
|
includeInThisContext("javatari.js/release/javatari/javatari.js");
|
||||||
Javatari.AUTO_START = false;
|
Javatari.AUTO_START = false;
|
||||||
includeInThisContext('src/cpu/z80fast.js');
|
includeInThisContext('src/cpu/z80fast.js');
|
||||||
//includeInThisContext('tss/js/Log.js');
|
includeInThisContext('tss/js/Log.js');
|
||||||
global.Log = require('tss/js/Log.js').Log;
|
//global.Log = require('tss/js/Log.js').Log;
|
||||||
includeInThisContext('tss/js/tss/PsgDeviceChannel.js');
|
includeInThisContext('tss/js/tss/PsgDeviceChannel.js');
|
||||||
includeInThisContext('tss/js/tss/MasterChannel.js');
|
includeInThisContext('tss/js/tss/MasterChannel.js');
|
||||||
includeInThisContext('tss/js/tss/AudioLooper.js');
|
includeInThisContext('tss/js/tss/AudioLooper.js');
|
||||||
includeInThisContext("jsnes/jsnes.min.js");
|
//includeInThisContext("jsnes/jsnes.min.js");
|
||||||
|
global.jsnes = require("jsnes/jsnes.min.js");
|
||||||
|
|
||||||
var emu = require('gen/emu.js');
|
var emu = require('gen/emu.js');
|
||||||
var Keys = emu.Keys;
|
var Keys = emu.Keys;
|
||||||
|
|
|
@ -9,8 +9,11 @@ var VerilogPlatform = emu.PLATFORMS['verilog'];
|
||||||
|
|
||||||
Object.assign(global, verilog); // copy global VL_* properties
|
Object.assign(global, verilog); // copy global VL_* properties
|
||||||
|
|
||||||
|
// TODO: must define $
|
||||||
|
|
||||||
function loadPlatform(msg) {
|
function loadPlatform(msg) {
|
||||||
var platform = new VerilogPlatform();
|
var platform = new VerilogPlatform();
|
||||||
|
platform.resume = function() { }; // prevent resume after reset
|
||||||
try {
|
try {
|
||||||
//console.log(msg.output.ports);
|
//console.log(msg.output.ports);
|
||||||
//console.log(msg.output.signals);
|
//console.log(msg.output.signals);
|
||||||
|
@ -28,7 +31,7 @@ function loadPlatform(msg) {
|
||||||
assert.deepEqual(state, platform.saveState());
|
assert.deepEqual(state, platform.saveState());
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
//platform.printErrorCodeContext(e, msg.output.code);
|
//platform.printErrorCodeContext(e, msg.output.code);
|
||||||
console.log(msg.intermediate.listing);
|
//console.log(msg.intermediate.listing);
|
||||||
console.log(msg.output.code);
|
console.log(msg.output.code);
|
||||||
console.log(e);
|
console.log(e);
|
||||||
throw e;
|
throw e;
|
||||||
|
|
|
@ -197,7 +197,7 @@ describe('Worker', function() {
|
||||||
assert.ok(fn);
|
assert.ok(fn);
|
||||||
done(err, msg);
|
done(err, msg);
|
||||||
};
|
};
|
||||||
doBuild(msgs, done2, 49699, 0, 0);
|
doBuild(msgs, done2, 51459, 0, 0);
|
||||||
});
|
});
|
||||||
it('should compile verilog assembler file (JSASM)', function(done) {
|
it('should compile verilog assembler file (JSASM)', function(done) {
|
||||||
var csource = ab2str(fs.readFileSync('presets/verilog/test2.asm'));
|
var csource = ab2str(fs.readFileSync('presets/verilog/test2.asm'));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user