Skip to content

Commit

Permalink
feat(#3706): add a few more puzzles
Browse files Browse the repository at this point in the history
  • Loading branch information
volodya-lombrozo committed Dec 20, 2024
1 parent b06f6b5 commit 81a1f71
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion eo-parser/src/test/java/org/eolang/parser/EoIndentLexerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.cactoos.text.TextOf;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

/**
Expand All @@ -48,7 +49,17 @@ public final class EoIndentLexerTest {
*/
public static final String TO_ADD_MESSAGE = "TO ADD ASSERTION MESSAGE";

/**
* Tests if the lexer emits a tab token with the correct name.
* @throws IOException In case if the input is invalid.
* @todo #3706:30min Fix the the name of the TAB token.
* Currently {@link EoIndentLexer} emits TAB token with the name 'ZERO' instead of 'TAB'.
* Fix the lexer to emit TAB token with the correct name.
* This problem affects lexer error messages.
* When this issue is fixed, remove the @Disabled annotation from the test.
*/
@Test
@Disabled
void emitsTabWithCorrectName() throws IOException {
MatcherAssert.assertThat(
"We expect the token to be a tab indentation with name 'TAB'",
Expand All @@ -57,12 +68,22 @@ void emitsTabWithCorrectName() throws IOException {
);
}

/**
* Tests if the lexer emits an untab token with the correct name.
* @throws IOException In case if the input is invalid.
* @todo #3706:30min Fix the the name of the UNTAB token.
* Currently {@link EoIndentLexer} emits UNTAB token with the name 'INT' instead of 'UNTAB'.
* Fix the lexer to emit UNTAB token with the correct name.
* This problem affects lexer error messages.
* When this issue is fixed, remove the @Disabled annotation from the test.
*/
@Test
@Disabled
void emitsUntabWithCorrectName() throws IOException {
MatcherAssert.assertThat(
"We expect the token to be an untab indentation with name 'UNTAB'",
new EoIndentLexer(new TextOf("\n \n \n")).getAllTokens().get(3).getText(),
Matchers.is("UNTAB")
Matchers.equalTo("UNTAB")
);
}

Expand Down

0 comments on commit 81a1f71

Please sign in to comment.