@Test
	public void testLexer()
	{
		Random rand = new Random();
		List<TokenType> types = new ArrayList<TokenType>();
		StringBuilder sb = new StringBuilder();

		final int max = TokenType.values().length;
		for(int i = 0; i < 10000; i++)
		{
			TokenType type = TokenType.values()[rand.nextInt(max)];
			types.add(type);
			if(type == TokenType.IDENT)
			{
				sb.append("swag213");
			}
			else if(type == TokenType.NUMBER)
			{
				sb.append("420");
			}
			else if(type == TokenType.STRING)
			{
				sb.append("\"swaglol35\"");
			}
			else
			{
				sb.append(type.identifier);
			}
			sb.append(" ");
			
			sb.append(TokenType.RBRACE);
			sb.append(" } ");
		}
		
		Lexer lexer = Lexer.newInstance();
		lexer.reset(sb.toString());
		List<Token> tokens = lexer.tokenize();

		for(int i = 0; i < tokens.size(); i++)
		{
			if(tokens.get(i).type != types.get(i))
				fail(tokens.get(i).type + " " + types.get(i));
		}
	}