Ad
  • Custom User Avatar

    If you're talking about the Sample tests, maybe you edited it? Click Reset of change it manually.

  • Custom User Avatar

    In my case, test 5 still had the number 2 as the expected answer.
    Thank you very much.

  • Custom User Avatar

    Are you sure about that? I've tried your current Java code and it worked.

    This is the fixed test with that input:

        @Test
        public void test5() {
            List<String> a =  new ArrayList<String>();
            a.add(":)"); a.add(":)"); a.add("x-]"); a.add(":ox"); a.add(";-("); a.add(";-)"); a.add(";~("); a.add(":~D");
            assertEquals(4, SmileFaces.countSmileys(a));
        }
    

    And you can see the expected answer is 4 there.

  • Custom User Avatar

    In this case, there should be four happy faces: [:), :), x-], :ox, ;-(, ;-), ;~(, :~D]
    :), :), ;-), :~D
    However, according to the test case, there are only two.

    Even if we remove the repeated one, there are still three faces that meet the condition.