-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Add simple unit tests #7696
Add simple unit tests #7696
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,12 @@ void extractURLFormLink() { | |
formatter.format("away.php?to=http%3A%2F%2Fwikipedia.org&a=snippet")); | ||
} | ||
|
||
@Test | ||
void validURLUnmodified() { | ||
// the caller has to pay attention that this does not happen | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What should not happen? Maybe just remove the comment. The call seems IMHO legal. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's on me, I copy-pasted and forgot to remove it. |
||
assertEquals("http://wikipedia.org", formatter.format("http://wikipedia.org")); | ||
} | ||
|
||
@Test | ||
void latexCommandsNotRemoved() { | ||
assertEquals("http://pi.informatik.uni-siegen.de/stt/36\\_2/./03\\_Technische\\_Beitraege/ZEUS2016/beitrag\\_2.pdf", formatter.format("http://pi.informatik.uni-siegen.de/stt/36\\_2/./03\\_Technische\\_Beitraege/ZEUS2016/beitrag\\_2.pdf")); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ public void setUp() { | |
|
||
@Test | ||
public void test() { | ||
assertEquals("lower", formatter.format("lower")); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you maybe change that to a paramterized test? We aim for having one assertion per test case. See also #6207 |
||
assertEquals("lower", formatter.format("LOWER")); | ||
assertEquals("lower {UPPER}", formatter.format("LOWER {UPPER}")); | ||
assertEquals("lower {U}pper", formatter.format("LOWER {U}PPER")); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We try to gradually migrate to Google's casing rules: https://google.github.io/styleguide/javaguide.html#s5.3-camel-case
Thus, please introduce defined camel case