X Tutup
The Wayback Machine - https://web.archive.org/web/20210605234557/https://github.com/TheAlgorithms/Java/pull/2180
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

Development test failure #2180

Open
wants to merge 3 commits into
base: Development
Choose a base branch
from

Conversation

@mk-94
Copy link

@mk-94 mk-94 commented Apr 13, 2021

Describe your change:

  • Add an algorithm?
  • Fix a bug or typo in an existing algorithm?
  • Documentation change?

References

Correct the test in UpperTest.java and delete comment. Test-cases are working now.

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new Java files are placed inside an existing directory.
  • All filenames are in all uppercase characters with no spaces or dashes.
  • All functions and variable names follow Java naming conventions.
  • All new algorithms have a URL in its comments that points to Wikipedia or other similar explanation.
  • If this pull request resolves one or more open issues then the commit message contains Fixes: #{$ISSUE_NO}.
@mk-94 mk-94 changed the base branch from master to Development Apr 13, 2021
@mk-94 mk-94 changed the base branch from Development to master Apr 13, 2021
@mk-94 mk-94 changed the base branch from master to Development Apr 13, 2021
//Assertions fail for functional reasons
Assertions.assertEquals(toUpperCase("abc"), "abc", "The strings are not equals");

Assertions.assertNotEquals(toUpperCase("abc"), "abc", "The strings are not equals");

This comment has been minimized.

@nishantc1527

nishantc1527 Apr 18, 2021
Contributor

I think it would be useful if there would be a test something like:

Assertions.assertEquals(toUpperCase("abc"), "ABC", "The strings are equal");

Just to check if the string is correctly capitalized.

@@ -8,8 +8,8 @@
@Test
void testUpper() {
Assertions.assertEquals(toUpperCase("abc"), ("abc").toUpperCase(), "The strings are equals");

This comment has been minimized.

@nishantc1527

nishantc1527 Apr 18, 2021
Contributor

Instead of "The strings are equals" I think it should be "The strings are equal"

This comment has been minimized.

@mk-94

mk-94 Apr 19, 2021
Author

I'll change it an make a new pull request. :)

@mk-94
Copy link
Author

@mk-94 mk-94 commented Apr 19, 2021

I need some more details why the test did not pass.
com.string.UpperTest > testUpper() FAILED
org.opentest4j.AssertionFailedError at UpperTest.java:12
That does not make sense i think. Locally everything worked fine.

@nishantc1527
Copy link
Contributor

@nishantc1527 nishantc1527 commented Apr 19, 2021

I'm also wondering why the tests don't work. I'm looking at it right now.

Assertions.assertEquals(toUpperCase("abc"), ("abc").toUpperCase(), "The strings are equals");
//Assertions fail for functional reasons
Assertions.assertEquals(toUpperCase("abc"), "abc", "The strings are not equals");
Assertions.assertEquals( "ABC",toUpperCase("abc"), "The strings are equal");

This comment has been minimized.

@nishantc1527

nishantc1527 Apr 20, 2021
Contributor

I guess you can revert this assertion and we can figure it out later.

@stale
Copy link

@stale stale bot commented Jun 3, 2021

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
X Tutup