<commit_before>//
//  FDChessboardViewTests.swift
//  FDChessboardViewTests
//
//  Created by <NAME> on 4/25/16.
//  Copyright © 2016 <NAME>. All rights reserved.
//

import XCTest
@testable import FDChessboardView

class FDChessboardViewTests: 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() {
        XCTAssert(true)
        // This is an example of a functional test case.
        // Use XCTAssert and related functions to verify your tests produce the correct results.
    }
}
<commit_msg>Added tests<commit_after>//
//  FDChessboardViewTests.swift
//  FDChessboardViewTests
//
//  Created by <NAME> on 4/25/16.
//  Copyright © 2016 <NAME>. All rights reserved.
//

import XCTest
@testable import FDChessboardView

class FDChessboardViewTests: XCTestCase {

    var chessboard: FDChessboardView?
    let squares = (FDChessboardSquare(index: 0), FDChessboardSquare(index: 1))
    
    override func setUp() {
        super.setUp()
        chessboard = FDChessboardView()
        // 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() {
        XCTAssert(true)
    }

    func testChessboard() {
        XCTAssert(chessboard != nil)
    }

    func testResizing() {
        XCTAssert(chessboard?.translatesAutoresizingMaskIntoConstraints == false)
    }

    func testBooleans() {
        XCTAssert(chessboard?.doesAnimate == true)
        XCTAssert(chessboard?.doesShowLegalSquares == true)
        XCTAssert(chessboard?.doesShowLastMove == true)
        XCTAssert(chessboard?.doesShowPremove == true)
    }

    func testMovePiece() {
        let val = chessboard?.movePieceAtCoordinate(squares.0, toCoordinate: squares.1)
        XCTAssert(val == true)
    }

    func testMoveAndPromotePiece() {
        let val = chessboard?.movePieceAtCoordinate(squares.0, toCoordinate: squares.1, andPromoteTo: .WhiteQueen)
        XCTAssert(val == true)
    }

    func testPremovePiece() {
        let val = chessboard?.premovePieceAtCoordinate(squares.0, toCoordinate: squares.1)
        XCTAssert(val == true)
    }

    func testPremoveAndPromotePiece() {
        let val = chessboard?.premovePieceAtCoordinate(squares.0, toCoordinate: squares.1, andPromoteTo: .WhiteQueen)
        XCTAssert(val == true)
    }

}

{'fraction_non_alphanumeric': 0.09271758436944938, 'fraction_numerical': 0.00994671403197158, 'mean_word_length': 2.700394218134034, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '105609', 'n_tokens_mistral': 919, 'n_tokens_neox': 858, 'n_words': 232}