<commit_before>//
//  BrushSpec.swift
//  SwiftyEcharts
//
//  Created by <NAME> on 05/07/2017.
//  Copyright © 2017 com.pluto-y. All rights reserved.
//

import Quick
import Nimble
@testable import SwiftyEcharts

class BrushSpec: QuickSpec {
    override func spec() {
        let rectToolbox = Brush.Toolbox.rect
        let polygonToolbox = Brush.Toolbox.polygon
        let lineXToolbox = Brush.Toolbox.lineX
        let lineYToolbox = Brush.Toolbox.lineY
        let keepToolbox = Brush.Toolbox.keep
        let clearToolbox = Brush.Toolbox.clear
        
        describe("For Brush.Toolbox") {
            let rectString = "rect"
            let polygonString = "polygon"
            let lineXString = "lineX"
            let lineYString = "lineY"
            let keepString = "keep"
            let clearString = "clear"
            
            it("needs to check the jsonString") {
                expect(rectToolbox.jsonString).to(equal(rectString.jsonString))
                expect(polygonToolbox.jsonString).to(equal(polygonString.jsonString))
                expect(lineXToolbox.jsonString).to(equal(lineXString.jsonString))
                expect(lineYToolbox.jsonString).to(equal(lineYString.jsonString))
                expect(keepToolbox.jsonString).to(equal(keepString.jsonString))
                expect(clearToolbox.jsonString).to(equal(clearString.jsonString))
            }
        }
        
        let indexIndexes = Brush.Indexes.indexes([0, 4, 2])
        let allIndexes = Brush.Indexes.all
        let noneIndexes = Brush.Indexes.none
        
        describe("For Brush.Indexes") {
            let indexArray = [0, 4, 2]
            let allString = "all"
            let noneString = "none"
            
            it("needs to check the jsonString") {
                expect(indexIndexes.jsonString).to(equal(indexArray.jsonString))
                expect(allIndexes.jsonString).to(equal(allString.jsonString))
                expect(noneIndexes.jsonString).to(equal(noneString.jsonString))
            }
        }
        
        let rectType = SwiftyEcharts.Brush.Type.rect
        let polygonType = SwiftyEcharts.Brush.Type.polygon
        let lineXType = SwiftyEcharts.Brush.Type.lineX
        let lineYType = SwiftyEcharts.Brush.Type.lineY
        
        describe("For Brush.Type") {
            let rectString = "rect"
            let polygonString = "polygon"
            let lineXString = "lineX"
            let lineYString = "lineY"
            
            expect(rectType.jsonString).to(equal(rectString.jsonString))
            expect(polygonType.jsonString).to(equal(polygonString.jsonString))
            expect(lineXType.jsonString).to(equal(lineXString.jsonString))
            expect(lineYType.jsonString).to(equal(lineYString.jsonString))
        }
        
        let singleMode = Brush.Mode.single
        let multipleMode = Brush.Mode.multiple
        
        describe("For Brush.Mode") { 
            let singleString = "single"
            let multipleString = "multiple"
            
            expect(singleMode.jsonString).to(equal(singleString.jsonString))
            expect(multipleMode.jsonString).to(equal(multipleString.jsonString))
        }
    }
}<commit_msg>test: Add test case for `Brush.ThrottleType`<commit_after>//
//  BrushSpec.swift
//  SwiftyEcharts
//
//  Created by <NAME> on 05/07/2017.
//  Copyright © 2017 com.pluto-y. All rights reserved.
//

import Quick
import Nimble
@testable import SwiftyEcharts

class BrushSpec: QuickSpec {
    override func spec() {
        let rectToolbox = Brush.Toolbox.rect
        let polygonToolbox = Brush.Toolbox.polygon
        let lineXToolbox = Brush.Toolbox.lineX
        let lineYToolbox = Brush.Toolbox.lineY
        let keepToolbox = Brush.Toolbox.keep
        let clearToolbox = Brush.Toolbox.clear
        
        describe("For Brush.Toolbox") {
            let rectString = "rect"
            let polygonString = "polygon"
            let lineXString = "lineX"
            let lineYString = "lineY"
            let keepString = "keep"
            let clearString = "clear"
            
            it("needs to check the jsonString") {
                expect(rectToolbox.jsonString).to(equal(rectString.jsonString))
                expect(polygonToolbox.jsonString).to(equal(polygonString.jsonString))
                expect(lineXToolbox.jsonString).to(equal(lineXString.jsonString))
                expect(lineYToolbox.jsonString).to(equal(lineYString.jsonString))
                expect(keepToolbox.jsonString).to(equal(keepString.jsonString))
                expect(clearToolbox.jsonString).to(equal(clearString.jsonString))
            }
        }
        
        let indexIndexes = Brush.Indexes.indexes([0, 4, 2])
        let allIndexes = Brush.Indexes.all
        let noneIndexes = Brush.Indexes.none
        
        describe("For Brush.Indexes") {
            let indexArray = [0, 4, 2]
            let allString = "all"
            let noneString = "none"
            
            it("needs to check the jsonString") {
                expect(indexIndexes.jsonString).to(equal(indexArray.jsonString))
                expect(allIndexes.jsonString).to(equal(allString.jsonString))
                expect(noneIndexes.jsonString).to(equal(noneString.jsonString))
            }
        }
        
        let rectType = SwiftyEcharts.Brush.Type.rect
        let polygonType = SwiftyEcharts.Brush.Type.polygon
        let lineXType = SwiftyEcharts.Brush.Type.lineX
        let lineYType = SwiftyEcharts.Brush.Type.lineY
        
        describe("For Brush.Type") {
            let rectString = "rect"
            let polygonString = "polygon"
            let lineXString = "lineX"
            let lineYString = "lineY"
            
            expect(rectType.jsonString).to(equal(rectString.jsonString))
            expect(polygonType.jsonString).to(equal(polygonString.jsonString))
            expect(lineXType.jsonString).to(equal(lineXString.jsonString))
            expect(lineYType.jsonString).to(equal(lineYString.jsonString))
        }
        
        let singleMode = Brush.Mode.single
        let multipleMode = Brush.Mode.multiple
        
        describe("For Brush.Mode") { 
            let singleString = "single"
            let multipleString = "multiple"
            
            expect(singleMode.jsonString).to(equal(singleString.jsonString))
            expect(multipleMode.jsonString).to(equal(multipleString.jsonString))
        }
        
        let debounceThrottleType = Brush.ThrottleType.debounce
        let fixRateThrottleType = Brush.ThrottleType.fixRate
        
        describe("For Brush.ThrottleType") { 
            let debounceString = "debounce"
            let fixRateString = "fixRate"
            
            expect(debounceThrottleType.jsonString).to(equal(debounceString.jsonString))
            expect(fixRateThrottleType.jsonString).to(equal(fixRateString.jsonString))
        }
    }
}
{'fraction_non_alphanumeric': 0.09564095210782908, 'fraction_numerical': 0.005162030398623459, 'mean_word_length': 2.0458515283842793, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '350198', 'n_tokens_mistral': 2073, 'n_tokens_neox': 1987, 'n_words': 331}