1
0

test12.spec.js 581 B

1234567891011121314151617181920212223
  1. import {
  2. IVProgParser
  3. } from './../js/ast/ivprogParser';
  4. import { LanguageService } from '../js/services/languageService';
  5. describe('SwitchCase command', () => {
  6. let input = `funcao inteiro test(real i) {
  7. escolha (i) {
  8. caso 1:
  9. retorne 0
  10. caso contrario:
  11. retorne 4
  12. }
  13. }`;
  14. const lexer = LanguageService.getCurrentLexer();
  15. it(`should not result in SyntaxError`, () => {
  16. const as = new IVProgParser(input, lexer);
  17. const fun = as.parseFunction.bind(as);
  18. expect(fun).not.toThrow();
  19. });
  20. });