<commit_before>import XCTest
import Nimble

class HaveCountTest: XCTestCase {
    func testEquality() {
        expect([1, 2, 3]).to(haveCount(3))
        expect([1, 2, 3]).notTo(haveCount(1))
    }
}<commit_msg>Test failure cases of haveCount matcher<commit_after>import XCTest
import Nimble

class HaveCountTest: XCTestCase {
    func testEquality() {
        expect([1, 2, 3]).to(haveCount(3))
        expect([1, 2, 3]).notTo(haveCount(1))

        failsWithErrorMessage("expected to have [1, 2, 3] with count 3, got 1") {
            expect([1, 2, 3]).to(haveCount(1))
        }

        failsWithErrorMessage("expected to not have [1, 2, 3] with count 3, got 3") {
            expect([1, 2, 3]).notTo(haveCount(3))
        }
    }
}
{'fraction_non_alphanumeric': 0.14654002713704206, 'fraction_numerical': 0.04613297150610583, 'mean_word_length': 2.9047619047619047, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6121816', 'n_tokens_mistral': 276, 'n_tokens_neox': 252, 'n_words': 64}