Skip to content

Commit

Permalink
Change of test for boolean and BLANK due to #142
Browse files Browse the repository at this point in the history
  • Loading branch information
aninde committed Feb 20, 2020
1 parent 7394e7b commit 1127b55
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions test/conformance/operators.spec.ts
Expand Up @@ -45,9 +45,9 @@ describe('Quality assurance of operators', () => {
expect(engine.getCellValue('Q1')).toEqual(0); // PERCENTAGE
});

xit('TRUE and BLANK should be supported by all comparison operators', () => {
it('TRUE and BLANK should be supported by all comparison operators', () => { //https://github.com/handsontable/hyperformula/issues/142
const engine = createEngine([
['true', null, ...data]
['true', EmptyValue, ...data]
]);

expect(engine.getCellValue('C1')).toEqual(false); // EQUAL
Expand All @@ -56,38 +56,38 @@ describe('Quality assurance of operators', () => {
expect(engine.getCellValue('F1')).toEqual(true); // GTE //true
expect(engine.getCellValue('G1')).toEqual(false); // LTE
expect(engine.getCellValue('H1')).toEqual(true); // NOT EQUAL
expect(engine.getCellValue('I1')).toEqual(1); // ADD //value
//expect(engine.getCellValue('J1')).toEqual(1); // SUB //value
//expect(engine.getCellValue('K1')).toEqual(0); // MULT //value
//expect(engine.getCellValue('L1')).toEqual(new DetailedCellError(new CellError(ErrorType.DIV_BY_ZERO), '#DIV/0!')); // DIV value, in GS div
//expect(engine.getCellValue('M1')).toEqual(1); // EXP value
//expect(engine.getCellValue('I1')).toEqual(1); // ADD // returns #VALUE!
//expect(engine.getCellValue('J1')).toEqual(1); // SUB //returns #VALUE!
//expect(engine.getCellValue('K1')).toEqual(0); // MULT //returns #VALUE!
//expect(engine.getCellValue('L1')).toEqual(new DetailedCellError(new CellError(ErrorType.DIV_BY_ZERO), '#DIV/0!')); // DIV returns #VALUE!
//expect(engine.getCellValue('M1')).toEqual(1); // EXP returns #VALUE!
expect(engine.getCellValue('N1')).toEqual('true'); // CONCAT
expect(engine.getCellValue('O1')).toEqual(true); // UNARY PLUS value
expect(engine.getCellValue('P1')).toEqual(-1); // UNARY MINUS value
expect(engine.getCellValue('Q1')).toEqual(0.01); // PERCENTAGE value
//expect(engine.getCellValue('O1')).toEqual(true); // UNARY PLUS returns #VALUE!
//expect(engine.getCellValue('P1')).toEqual(-1); // UNARY MINUS returns #VALUE!
//expect(engine.getCellValue('Q1')).toEqual(0.01); // PERCENTAGE returns #VALUE!
});

xit('BLANK and TRUE should be supported by all comparison operators', () => {
it('BLANK and TRUE should be supported by all comparison operators', () => { //https://github.com/handsontable/hyperformula/issues/142
const engine = createEngine([
[null, 'true', ...data]
['null', 'true', ...data]
]);

expect(engine.getCellValue('D1')).toEqual(false); // GT
expect(engine.getCellValue('E1')).toEqual(true); // LT
expect(engine.getCellValue('F1')).toEqual(false); // GTE
expect(engine.getCellValue('G1')).toEqual(true); // LTE
//expect(engine.getCellValue('J1')).toEqual(-1); // SUB value
expect(engine.getCellValue('L1')).toEqual(0); // DIV value
//expect(engine.getCellValue('M1')).toEqual(0); // EXP value
//expect(engine.getCellValue('J1')).toEqual(-1); // SUB returns value
//expect(engine.getCellValue('L1')).toEqual(0); // DIV returns value
//expect(engine.getCellValue('M1')).toEqual(0); // EXP returns value
});

xit('BLANK and FALSE should be supported by all comparison operators', () => {
it('BLANK and FALSE should be supported by all comparison operators', () => {
const engine = createEngine([
[null, 'false', ...data]
]);

expect(engine.getCellValue('D1')).toEqual(false); // GT
//expect(engine.getCellValue('E1')).toEqual(false); // LT true
expect(engine.getCellValue('E1')).toEqual(false); // LT true
expect(engine.getCellValue('F1')).toEqual(true); // GTE //false
//expect(engine.getCellValue('G1')).toEqual(true); // LTE //false
//expect(engine.getCellValue('J1')).toEqual(0); // SUB value
Expand Down

0 comments on commit 1127b55

Please sign in to comment.