<commit_before>//
//  PermutationTests.swift
//  SwiftParsec
//
//  Created by <NAME> on 2015-11-05.
//  Copyright © 2015 <NAME>. All rights reserved.
//

import XCTest
@testable import SwiftParsec

class PermutationTests: XCTestCase {
    
    func testPermutation() {<commit_msg>Add test for permutation parser collection methods<commit_after>//
//  PermutationTests.swift
//  SwiftParsec
//
//  Created by <NAME> on 2015-11-05.
//  Copyright © 2015 <NAME>. All rights reserved.
//

import XCTest
@testable import SwiftParsec

class PermutationTests: XCTestCase {
    
    func testCollectionMethods() {
        
        var permutation: Permutation = [
            
            (StringParser.character("a"), nil),
            (StringParser.character("b"), nil),
            (StringParser.character("c"), nil)
            
        ]

        XCTAssertEqual(permutation.count, 3, "Permutation.count returned wrong value.")
        
        permutation.replaceRange(0...0, with: [])
        
        XCTAssertEqual(permutation.count, 2, "Permutation.replaceRange did not remove first element.")
        
    }
    
    func testPermutation() {
{'fraction_non_alphanumeric': 0.1137357830271216, 'fraction_numerical': 0.024496937882764653, 'mean_word_length': 2.3746312684365782, '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': '7044457', 'n_tokens_mistral': 372, 'n_tokens_neox': 329, 'n_words': 83}