From 1127b5575e30342d5843ef6d7be173986c973848 Mon Sep 17 00:00:00 2001 From: ndemytruk Date: Thu, 20 Feb 2020 20:33:41 +0100 Subject: [PATCH] Change of test for boolean and BLANK due to #142 --- test/conformance/operators.spec.ts | 34 +++++++++++++++--------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/test/conformance/operators.spec.ts b/test/conformance/operators.spec.ts index 158652ed13..39e3df8319 100644 --- a/test/conformance/operators.spec.ts +++ b/test/conformance/operators.spec.ts @@ -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 @@ -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