test42.spec.js 431 B

12345678910
  1. import { resultTypeAfterInfixOp } from './../js/processor/compatibilityTable';
  2. import { Operators } from './../js/ast/operators';
  3. import { Types } from '../js/ast/types';
  4. describe("The compatbility table", () => {
  5. it("should return the correct type for a given infix operator application", () => {
  6. const type = resultTypeAfterInfixOp(Operators.ADD, Types.INTEGER, Types.REAL);
  7. expect(type).toEqual(Types.REAL);
  8. });
  9. });