Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo in TwoCarCrossing, yet no error indication #2

Open
HelgeStenstrom opened this issue Jan 8, 2018 · 3 comments
Open

Typo in TwoCarCrossing, yet no error indication #2

HelgeStenstrom opened this issue Jan 8, 2018 · 3 comments

Comments

@HelgeStenstrom
Copy link

The table for invalid states in TwoCarCrossing seems to have a type on the last line:
|yellow blinkl|yellow |

There is one ell to many. Since "yellow blinkl" is a state that is not defined by any code, I suspect that it could be anything, such as "tom selleck", and it wouldn't matter.

@mgaertne
Copy link
Owner

Well, FitNesse trims the values from the table before sending them to the fixture class by default. You can disable that, but I deliberately wanted to make use of this feature here.

@HelgeStenstrom
Copy link
Author

Whitespace trimming, if that is what you mean, doesn't remove the excess ell. You are using the fact that LightState.valueFor("yellow blinkl") == UNKNOWN, but that doesn't exercise the same code as LightState.valueFor("yellow blink"). The former is because of line 22 of LightState.java, the latter is because of line 20.

If this is what you wanted, I think it would be better to be less subtile, and replace "yellow blinkl" with "otherwise" or "doesntMatter".

@mgaertne
Copy link
Owner

Ah, now I see it. Yeah, you are right, I fixed it in the latest changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants