Skip to content

Commit

Permalink
Coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
jazz-soft committed Mar 15, 2024
1 parent a366648 commit 9cdabe4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
12 changes: 6 additions & 6 deletions javascript/JZZ.js
Original file line number Diff line number Diff line change
Expand Up @@ -2773,13 +2773,13 @@
mmm = new MIDI([0xf0].concat(a, [0xf7]));
this._cc[kk].sx = undefined;
}
else if (st == 1) {
if (st == 1) {
this._cc[kk].sx = a;
}
else if (st == 2) {
if (st == 2) {
if (this._cc[kk].sx) this._cc[kk].sx = this._cc[kk].sx.concat(a);
}
else if (st == 3) {
if (st == 3) {
if (this._cc[kk].sx) {
a = this._cc[kk].sx.concat(a);
mmm = new MIDI([0xf0].concat(a, [0xf7]));
Expand Down Expand Up @@ -2812,13 +2812,13 @@
msg.label(_m2_str(a));
this._cc[kk].tx = undefined;
}
else if (st == 1) {
if (st == 1) {
this._cc[kk].tx = a;
}
else if (st == 2) {
if (st == 2) {
if (this._cc[kk].tx) this._cc[kk].tx = this._cc[kk].tx.concat(a);
}
else if (st == 3) {
if (st == 3) {
if (this._cc[kk].tx) {
a = this._cc[kk].tx.concat(a);
msg.label(_m2_str(a));
Expand Down
10 changes: 10 additions & 0 deletions test/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -2020,6 +2020,16 @@ describe('JZZ.Context', function() {
msg = JZZ.MIDI2.umpCText(2, 3, 'π„ž');
ctxt._receive(msg[0]);
assert.equal(msg[0].toString(), 'd2030200 eda0b4ed b49e0000 00000000 -- Text (π„ž)');
msg = JZZ.MIDI2.umpText(1, 'π„ž π„ž MIDI π„ž π„ž');
ctxt._receive(msg[1]);
assert.equal(msg[1].toString(), 'd1900200 9e204d49 444920ed a0b4edb4 -- Text');
ctxt._receive(msg[2]);
assert.equal(msg[2].toString(), 'd1d00200 9e20eda0 b4edb49e 00000000 -- Text');
ctxt._receive(msg[0]);
assert.equal(msg[0].toString(), 'd1500200 eda0b4ed b49e20ed a0b4edb4 -- Text');
ctxt._receive(msg[1]);
ctxt._receive(msg[2]);
assert.equal(msg[2].toString(), 'd1d00200 9e20eda0 b4edb49e 00000000 -- Text (π„ž π„ž MIDI π„ž π„ž)');
});
it('noop', function() {
var ctxt = JZZ.Context();
Expand Down

0 comments on commit 9cdabe4

Please sign in to comment.