7 kyu
L2: Triple X
2,716 of 4,967Swolebrain
Loading description...
Strings
Regular Expressions
Fundamentals
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
C# translation
Description should be language-agnostic (function name should be removed to acheive consistency across all languages)
done
COBOL translation (author inactive).
approved
C translation (author gone)
Thanks :)
Hello, seems like i found a bag with random test. Language - js
Random test fails:
Testing for str = "xxkittykitty": expected true to equal false
How is that possible? we have 'xx' in this string. Why expected false? No one of this letters is capital
sorry, misunderstood the task. We must search for 'xxx' not the 'xx'
There is no triple x, that's why. Not a kata issue.
This comment has been hidden.
Rust translation kumited.
This comment has been hidden.
Clojure Translation ready for review
approved
Test OK. Random test is not.((( What can be the reason of undefined? Expected: false, instead got: undefined
When posting such a question, please mention your language, post your code ( properly marked up and spoilered ), and include input and actual and expected output of a test you're failing. Help us help you!
That said, you might be forgetting a
return
statement.This comment has been hidden.
Python translation
🐍
Please review and approve. (someone else cause the kata creator is inactive)
1200 random tests are really necessary? Or you just used incorrect indenting?
should be perhaps
Yes it makes more sense your way. I updated it thanks :)
random test "xxxxkittyx" Expected: false, instead got: true.
it should expect true. the random testing on this one is broken.
You might very well be correct. But if we don't know which language this is, it ain't gonna get fixed.
Should 'warmXxx' return true or false? If false, everything is ok Else, we got and issue with the random tests.
Read the description.
My apologies, let me explain it again: 'warmXxx' expected true and got false in the random tests.
The control function expects false for that input.
The reference solution returns
false
.Kata description does not specify what to do in scenarios when there is no occurrence of "x" in the string
Fixed.
new to codewars, so not sure what test cases should be provided oob, but needs a test case with no "x" at all
Fixed.
Fixed all the test, used Test.assertEquals and added 50 random test. Please review and thanks for your contribution.
Thanks a lot! Sorry I couldn't fix my own errors, have had some bad personal situations come up.
This comment has been hidden.
Fixed this, please mark as resolved.
Cool and what's even better, you even replaced all of them with
Test.assertEquals
. Thank you. :-)Provided tests are incorrect. Test.expect(tripleX("xoxotrololololololoxxx"),"Should be false"); should be Test.expect(!tripleX("xoxotrololololololoxxx"),"Should be false");
Fixed, please mark as resolved. :)
Cool!
Javascript example test cases use
Test.expect
and are not working correct...I'm experiencing the same issues with this one...
What if there is no
'x'
in the string? Should the function return true or false?Now you have to return false.