Ad
  • Custom User Avatar

    Reference solution and fixed tests also ignore any situation where both person have 0yo in age (which would be twice the age of the other, since 0 * 2 = 0):

    Abraham Lincoln and Charles Darwin
    
    how_many_days(02/12/1809, 02/12/1809)
    365 should equal 0
    
  • Custom User Avatar

    Reference solution is demonstrably wrong:

    Testing for 04/20/1993 and 06/02/1772
    365 should equal 366
    
    04/20/2213 - 06/01/2213
    04/20/1993: 220yo
    06/02/1772: 440yo
    
    06/02/2214 - 04/19/2215
    04/20/1993: 221yo
    06/02/1772: 442yo
    

    These two range will sum up to 365 as none of the ranges hit leap years.

  • Custom User Avatar
    • JS Node 18. (chai / assert) should be enabled
  • Default User Avatar
  • Default User Avatar

    The Swift tests are still broken.

    The sample tests fail by themselves independent of the solution code: https://i.imgur.com/qwh8jTm.png

    The "attempt" random tests expect the wrong results for "8.2M ohms" ( https://i.imgur.com/21Xarxu.png ) and "4.1M ohms". ( https://i.imgur.com/ppBHn61.png )

  • Custom User Avatar

    Tests have a problem. They do not detect an error when there is a resistor value like "4.7M ohms". My code answered a wrong value and still passed the tests.

  • Custom User Avatar
    • Node 18 (mocha + chai) should be enabled (Refer this and this for more info)

    • Ruby 3.0 should be enabled (Refer this & this for more detail)

  • Custom User Avatar
    • Node 18 (mocha + chai) should be enabled (Refer this and this for more info)
  • Custom User Avatar

    In Python, the special message and the # -*- coding: utf-8 -*- are not necessary anymore since only Python 3.6 is allowed.

  • Default User Avatar

    @tachyonlabs Anybody?..

    main.swift:25:74: error: module 'test' has no member named '0'
                    ("Some Common Resistor Value Tests", commonValueTests, "Testing with \(test.0)"),
                                                                                           ^~~~ ~
    main.swift:35:26: error: cannot convert value of type '[(String, (ExampleTest) -> () -> (), String)]' to expected argument type '[(String, (XCTestCase) -> () -> Void)]'
        testCase(ExampleTest.allTests)
        ```
    
  • Custom User Avatar

    Crystal version seems to require integer overflow in order to pass the tests. The tests should be updated to use Int64 where appropriate.

  • Default User Avatar

    Well, I spent some times on this, and I'm sorry to agree with gopherati, the reference code is buggy.
    After guessing a lot, I assumed my code is OK and so I passed the tests in force (trying until random being in my favor).
    The problem with your code is that when oldest birthday is before youngest in the year (see spoiler comment below).

    Also, while trying another way to do this, I got this error:
    ValueError: day is out of range for month
    To me, this can happen only with one of birthday being "02/29/Y".

    Finally, the fact I passed the test in force means there isn't enough edge cases tests.
    There should be at least every combinations of:
    oldest_birthday < or == or > youngest_birthday,
    "02/28" equal to one of, or before, or between, or after birthdays,
    more or less than 365 days between births.

  • Custom User Avatar

    adding to the description a short example/representation of a tree could be a good idea, imo.

    edit: rather than a representation, the statements of the definition of a small tree would be better: this way, the user will see that "undirected" is actually equivalent to "doubly linked" (for those who aren't familiar with graph nodes).

  • Custom User Avatar

    Java test cases should inlcude border examples as my solution is wrong and i have passed the kata.

  • Custom User Avatar

    Met the issue with one of test cases as @pjleejr mentioned

    Some Random Resistor Value Tests : XCTAssertEqual failed: ("yellow brown green gold")
    is not equal to ("yellow black green gold") - Testing with 4.1M ohms

    "yellow black green gold" which would be 4.0M

  • Loading more items...