mirror of
https://github.com/josdejong/mathjs.git
synced 2026-01-18 14:59:29 +00:00
17 lines
294 B
JavaScript
17 lines
294 B
JavaScript
// test data type Unit
|
|
|
|
var assert = require('assert');
|
|
var math = require('../../math.js'),
|
|
Complex = math.Complex,
|
|
Unit = math.Unit;
|
|
|
|
|
|
var unit1 = new Unit(5000, 'cm');
|
|
assert.equal(unit1, '50 m');
|
|
|
|
assert.throws(function () {
|
|
Unit(2, 'inch');
|
|
});
|
|
|
|
// TODO: extensively test Unit
|