mirror of
https://github.com/Karaka-Management/jsOMS.git
synced 2026-02-15 16:58:42 +00:00
Add math bug test
This commit is contained in:
parent
2bcfe6dc13
commit
75c860b6b7
|
|
@ -2,13 +2,14 @@ describe('MathProcessorTest', function ()
|
||||||
{
|
{
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
describe('testEvaluation', function ()
|
describe('testBasicEvaluation', function ()
|
||||||
{
|
{
|
||||||
it('Testing formula evaluation', function ()
|
it('Testing formula evaluation', function ()
|
||||||
{
|
{
|
||||||
expect(jsOMS.mathEvaluate('3 + 4 * 2 / ( 1 - 5 ) ^ 2 ^ 3 + 1.5')).toBeCloseTo(4.5, 2);
|
expect(jsOMS.mathEvaluate('3 + 4 * 2 / ( 1 - 5 ) ^ 2 ^ 3 + 1.5')).toBeCloseTo(4.5, 2);
|
||||||
expect(jsOMS.mathEvaluate('3+4*2/(1-5)^2^3+1.5')).toBeCloseTo(4.5, 2);
|
expect(jsOMS.mathEvaluate('3+4*2/(1-5)^2^3+1.5')).toBeCloseTo(4.5, 2);
|
||||||
expect(jsOMS.mathEvaluate('invalid')).toBe(null);
|
expect(jsOMS.mathEvaluate('invalid')).toBe(null);
|
||||||
|
expect(jsOMS.mathEvaluate('3+4*2/(1-5^2^3+1.5')).toBe(null);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
Loading…
Reference in New Issue
Block a user