package edu.kit.stc.lexer;


import edu.kit.stc.vocabulary.terminal.Token;

import java.util.ArrayList;
import java.util.Queue;

import static org.junit.Assert.*;

/**
 * Created by florian on 08.05.16.
 */
public class LexerTest {
    @org.junit.Test
    public void testLex() throws Exception {
        final String SAMPLE_INPUT = "abc(56.23e45L+42.)/";

        Lexer lxr = new Lexer(SAMPLE_INPUT);

        Queue<Token> tokens = lxr.lex();

        for (Token t : tokens) {
            System.out.println(t.toString());
        }
    }
}
@@ -22,16 +22,63 @@
 exer;%0A%0A%0A
+import edu.kit.stc.lexer.exception.LException;%0A
 import e
@@ -115,16 +115,16 @@
 .Token;%0A
-
 %0Aimport 
@@ -312,93 +312,935 @@
 oid 
-testLex() throws Exception %7B%0A        final String SAMPLE_INPUT = %22abc(56.23e45L+42.)/
+simpleArithOperands() throws Exception %7B%0A        final String SAMPLE_INPUT = %22-+==*/%22;%0A%0A        Lexer lxr = new Lexer(SAMPLE_INPUT);%0A%0A        Queue%3CToken%3E tokens = lxr.lex();%0A%0A        for (Token t : tokens) %7B%0A            System.out.println(t.toString());%0A        %7D%0A    %7D%0A%0A    @org.junit.Test(expected = LException.class)%0A    public void faultyFloat() throws Exception %7B%0A        final String SAMPLE_INPUT = %2242%22;%0A%0A        Lexer lxr = new Lexer(SAMPLE_INPUT);%0A%0A        lxr.lex();%0A    %7D%0A%0A    @org.junit.Test%0A    public void floatWithNachkommaanteil() throws Exception %7B%0A        final String SAMPLE_INPUT = %2242.42l%22;%0A%0A        Lexer lxr = new Lexer(SAMPLE_INPUT);%0A%0A        Queue%3CToken%3E tokens = lxr.lex();%0A%0A        for (Token t : tokens) %7B%0A            System.out.println(t.toString());%0A        %7D%0A    %7D%0A%0A    @org.junit.Test%0A    public void complexFloatWithExponent() throws Exception %7B%0A        final String SAMPLE_INPUT = %2242.41e-14L
 %22;%0A%0A

Add some little tests for lexer