Ad
  • Default User Avatar

    "Fails to compile unless the tuple has exactly one element of that type."

    That type here being int and double.

    Clever, but not robust.

  • Default User Avatar

    There might be something wrong with tests in C++ Clang 8 C++17

    I get:

    Invalid result for s = "icuhmjxlpfwsdvr", part1 = "icuhmjxlwdr", part2 = "pfsv" Expected: false Actual: true

    But you can join it easily

    icuhmjxlpfwsdvr icuhmjxl w d r pf s v
  • Default User Avatar

    ;-)

  • Default User Avatar

    not enough details for us to act on

  • Default User Avatar

    duplicate issue

  • Default User Avatar

    duplicate issue

  • Default User Avatar

    duplicate issue

  • Default User Avatar

    My problems with test cases:

    Clang 8 C++17

    "Low aces are NOT valid in this kata."

    compare_poker_hands

    Test case: Assert::That (run_test ("2S 3H 4H 5S AC", "AH AC 5H 6H AS", Result::Win )); // "Low-ace straight wins of three of a kind"

    Why low ace wins, when it's banned?

    random_compare_poker_hands

    testCase 11

    Player hand: 2C 3C 4C 5C AH // nothing - best ace (or low-ace straight, which should be banned)

    Opponent hand: 4D 4S 8C JS KH // a pair

    expected Win, should be Loss, since low-aces are banned

    testCase 122

    Player hand: 2C 3C 4C 5C AH // nothing - best ace then 5 (or low-ace straight, which should be banned)

    Opponent hand: 6S 9D TH KD AD // nothing - best ace then king

    expected Win, should be Loss, since low-aces are banned and king is better than 5

    testCase 149

    Player hand: 3S 5S 7C 7H 7S // triplet

    Opponent hand: 2C 3C 4C 5C AH // nothing - best ace (or low-ace straight, which should be banned)

    expected Loss, should be Win, since low-aces are banned

    testCase 160

    Player hand: 3C 5D 5S KH KH // two pairs

    Opponent hand: 2C 3C 4C 5C AH // nothing - best ace (or low-ace straight, which should be banned)

    expected Loss, should be Win, since low-aces are banned

    testCase 244

    Player hand: 2C 3C 4C 5C AH // nothing - best ace (or low-ace straight, which should be banned)

    Opponent hand: 2H 3H 3S 4C 4H // two pairs

    expected Win, should be Loss, since low-aces are banned

    testCase 297

    Player hand: 2C 3C 4C 5C AH // nothing - best ace (or low-ace straight, which should be banned)

    Opponent hand: 2H 7C 7H 7S KH // a triplet

    expected Win, should be Loss, since low-aces are banned

    testCase 357

    Player hand: 2H 3H 3S 4C 4H // two pairs

    Opponent hand: 2C 3C 4C 5C AH // nothing - best ace (or low-ace straight, which should be banned)

    expected Loss, should be Win, since low-aces are banned

    testCase 368

    Player hand: 2C 3C 4C 5C AH // nothing - best ace (or low-ace straight, which should be banned)

    Opponent hand: 2H 4H 8D KC KS // a pair

    expected Win, should be Loss, since low-aces are banned

    testCase 405

    Player hand: 2H 3H 3S 4C 4H // two pairs

    Opponent hand: 2C 3C 4C 5C AH // nothing - best ace (or low-ace straight, which should be banned)

    expected Loss, should be Win, since low-aces are banned

  • Default User Avatar

    Still an issue in Clang 8 C++17

  • Default User Avatar

    Well, no one expected robustness, I guess

  • Default User Avatar

    Now imagine a plot twist where he used a code to generate this table.