<commit_before>//
//  HRSwiftTests.swift
//  HRSwiftTests
//
//  Created by <NAME> on 2015-11-20.
//  Copyright © 2015 <NAME>. All rights reserved.
//

import XCTest
@testable import HRSwift

class HRSwiftTests: XCTestCase {
    
    override func setUp() {
        super.setUp()
        // Put setup code here. This method is called before the invocation of each test method in the class.
    }
    
    override func tearDown() {
        // Put teardown code here. This method is called after the invocation of each test method in the class.
        super.tearDown()
    }
    
    func testExample() {
        // This is an example of a functional test case.
        // Use XCTAssert and related functions to verify your tests produce the correct results.
    }
    
    func testPerformanceExample() {
        // This is an example of a performance test case.
        self.measureBlock {
            // Put the code you want to measure the time of here.
        }
    }
    
    func testContainsAllEnglishCharacters() {
        let test1 = "abc"
        let test2 = "AbcdefghijklmnopqRstUVWxyZ"
        let test3 = "Abcdefghijkl  mnopqRstUVWxyZ"
        let test4 = "The quick brown fox jumps over the lazy dog"
        XCTAssert(!test1.containsAllEnglishCharacters(), "Pass")
        XCTAssert(test2.containsAllEnglishCharacters(), "Pass")
        XCTAssert(test3.containsAllEnglishCharacters(), "Pass")
        XCTAssert(test4.containsAllEnglishCharacters(), "Pass")
    }
    
    func testContainsAllEnglishCharactersWithArray() {
        let test1 = "abc"
        let test2 = "AbcdefghijklmnopqRstUVWxyZ"
        let test3 = "Abcdefghijkl  mnopqRstUVWxyZ"
        let test4 = "The quick brown fox jumps over the lazy dog"
        let mySolution = Pangrams()
        XCTAssert(!mySolution.checkPangramsWithArray(test1), "Pass")
        XCTAssert(mySolution.checkPangramsWithArray(test2), "Pass")
        XCTAssert(mySolution.checkPangramsWithArray(test3), "Pass")
        XCTAssert(mySolution.checkPangramsWithArray(test4), "Pass")
    }
    
    func testStringPalindrome() {
        let test1 = "aaa"
        let test2 = "abcd"
        let test3 = "afggfa"
        XCTAssert(test1.isPalindrome(), "Pass")
        XCTAssert(!test2.isPalindrome(), "Pass")
        XCTAssert(test3.isPalindrome(), "Pass")
    }
    
    func testQueueImplementation() {
        var queue = Queue<String>()
        queue.enqueue("Yansong")
        queue.enqueue("Li")
        queue.enqueue("Great")
        XCTAssert(queue.dequeue() == .Some("Yansong"), "Pass")
        XCTAssert(queue.dequeue() == "Li", "Pass")
        XCTAssert(queue.dequeue() == "Great", "Pass")
    }
    
    func testHexagonalGrid() {
        let test = HexagonalGrid()
        var testGrid1 = [[0,0], [0,0]]
        var testGrid2 = [[0,0], [1,0]]
        var testGrid3 = [[0,0], [0,1]]
        var testGrid4 = [[0,0], [1,1]]
        var testGrid5 = [[1,0], [0,0]]
        var testGrid6 = [[1,0], [1,0]]
        var testGrid7 = [[1,0], [0,1]]
        XCTAssert(test.rec(&testGrid1),"Pass")
        XCTAssert(!test.rec(&testGrid2),"Pass")
        XCTAssert(!test.rec(&testGrid3),"Pass")
        XCTAssert(test.rec(&testGrid4),"Pass")
        XCTAssert(!test.rec(&testGrid5),"Pass")
        XCTAssert(test.rec(&testGrid6),"Pass")
        XCTAssert(test.rec(&testGrid7),"Pass")
    }
    
    func testSamAndSubStrings() {
        let test = SamAndSubString()
        XCTAssert(test.solve("16")==23, "Pass")
    }
    
}<commit_msg>Added test case failure<commit_after>//
//  HRSwiftTests.swift
//  HRSwiftTests
//
//  Created by <NAME> on 2015-11-20.
//  Copyright © 2015 <NAME>. All rights reserved.
//

import XCTest
@testable import HRSwift

class HRSwiftTests: XCTestCase {
    
    override func setUp() {
        super.setUp()
        // Put setup code here. This method is called before the invocation of each test method in the class.
    }
    
    override func tearDown() {
        // Put teardown code here. This method is called after the invocation of each test method in the class.
        super.tearDown()
    }
    
    func testExample() {
        // This is an example of a functional test case.
        // Use XCTAssert and related functions to verify your tests produce the correct results.
    }
    
    func testPerformanceExample() {
        // This is an example of a performance test case.
        self.measureBlock {
            // Put the code you want to measure the time of here.
        }
    }
    
    func testContainsAllEnglishCharacters() {
        let test1 = "abc"
        let test2 = "AbcdefghijklmnopqRstUVWxyZ"
        let test3 = "Abcdefghijkl  mnopqRstUVWxyZ"
        let test4 = "The quick brown fox jumps over the lazy dog"
        XCTAssert(!test1.containsAllEnglishCharacters(), "Pass")
        XCTAssert(test2.containsAllEnglishCharacters(), "Pass")
        XCTAssert(test3.containsAllEnglishCharacters(), "Pass")
        XCTAssert(test4.containsAllEnglishCharacters(), "Pass")
    }
    
    func testContainsAllEnglishCharactersWithArray() {
        let test1 = "abc"
        let test2 = "AbcdefghijklmnopqRstUVWxyZ"
        let test3 = "Abcdefghijkl  mnopqRstUVWxyZ"
        let test4 = "The quick brown fox jumps over the lazy dog"
        let mySolution = Pangrams()
        XCTAssert(!mySolution.checkPangramsWithArray(test1), "Pass")
        XCTAssert(mySolution.checkPangramsWithArray(test2), "Pass")
        XCTAssert(mySolution.checkPangramsWithArray(test3), "Pass")
        XCTAssert(mySolution.checkPangramsWithArray(test4), "Pass")
    }
    
    func testStringPalindrome() {
        let test1 = "aaa"
        let test2 = "abcd"
        let test3 = "afggfa"
        XCTAssert(test1.isPalindrome(), "Pass")
        XCTAssert(!test2.isPalindrome(), "Pass")
        XCTAssert(test3.isPalindrome(), "Pass")
    }
    
    func testQueueImplementation() {
        var queue = Queue<String>()
        queue.enqueue("Yansong")
        queue.enqueue("Li")
        queue.enqueue("Great")
        XCTAssert(queue.dequeue() == .Some("Yansong"), "Pass")
        XCTAssert(queue.dequeue() == "Li", "Pass")
        XCTAssert(queue.dequeue() == "Great", "Pass")
    }
    
    func testHexagonalGrid() {
        let test = HexagonalGrid()
        var testGrid1 = [[0,0], [0,0]]
        var testGrid2 = [[0,0], [1,0]]
        var testGrid3 = [[0,0], [0,1]]
        var testGrid4 = [[0,0], [1,1]]
        var testGrid5 = [[1,0], [0,0]]
        var testGrid6 = [[1,0], [1,0]]
        var testGrid7 = [[1,0], [0,1]]
        XCTAssert(test.rec(&testGrid1),"Pass")
        XCTAssert(!test.rec(&testGrid2),"Pass")
        XCTAssert(!test.rec(&testGrid3),"Pass")
        XCTAssert(test.rec(&testGrid4),"Pass")
        XCTAssert(!test.rec(&testGrid5),"Pass")
        XCTAssert(test.rec(&testGrid6),"Pass")
        XCTAssert(test.rec(&testGrid7),"Pass")
    }
    
    func testSamAndSubStrings() {
        let test = SamAndSubString()
        XCTAssert(test.solve("16") != 23, "Pass")
    }
    
}
{'fraction_non_alphanumeric': 0.1260360102886539, 'fraction_numerical': 0.02286367533581023, 'mean_word_length': 2.517085427135678, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '6935883', 'n_tokens_mistral': 2333, 'n_tokens_neox': 2278, 'n_words': 524}