Skip to content

Commit

Permalink
add unit test for previous fix
Browse files Browse the repository at this point in the history
  • Loading branch information
biasmv committed Dec 5, 2015
1 parent 8d9d6b0 commit d99d2bd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/tests/mol/basics.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,12 @@ test('get atom by name', function(assert) {
assert.strictEqual(oxygen.residue().chain().name(), 'A');
});

test('get atom by index (out of bounds)', function(assert) {
var r = FRAGMENT.chain('A').residueByRnum(905);
assert.strictEqual(r.atom(r.atoms().length), null);
assert.strictEqual(r.atom(-1), null);
});

test('get atom by name that does not exists', function(assert) {
assert.strictEqual(FRAGMENT.atom('A.905.OX'), null);
assert.strictEqual(FRAGMENT.atom('A.100000.CA'), null);
Expand Down

0 comments on commit d99d2bd

Please sign in to comment.