test14.spec.js 586 B

12345678910111213141516171819202122232425
  1. import {
  2. IVProgParser
  3. } from './../js/ast/ivprogParser';
  4. import { LanguageService } from '../js/services/languageService';
  5. describe('For with no \';\'', () => {
  6. let input = `funcao inteiro test(real i) {
  7. inteiro a = 5 + i
  8. a = 5 + G[i][6]
  9. para (a = 0
  10. a < 5
  11. a = a + 1) {
  12. a = a
  13. }
  14. }`;
  15. const lexer = LanguageService.getCurrentLexer();
  16. it(`should result in SyntaxError`, () => {
  17. const as = new IVProgParser(input, lexer);
  18. const fun = as.parseFunction.bind(as);
  19. expect(fun).toThrow();
  20. });
  21. });