<commit_before>//
//  DrawTest.swift
//  BezierKit
//
//  Created by <NAME> on 8/6/18.
//  Copyright © 2018 <NAME>. All rights reserved.
//

import XCTest
@testable import BezierKit

class DrawTest: 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 testHSLToRGB() {
        
        let one: CGFloat = CGFloat(1.0)
        let zero: CGFloat = CGFloat(0.0)
        
        var r = zero
        var g = zero
        var b = zero
        
        Draw.HSLToRGB(h: 0.0, s: 1.0, l: 0.5, outR: &r, outG: &g, outB: &b) // pure red
        XCTAssertEqual([r, g, b], [one, zero, zero])
        
        Draw.HSLToRGB(h: 240.0 / 360.0, s: 1.0, l: 0.25, outR: &r, outG: &g, outB: &b) // dark blue
        XCTAssertEqual([r, g, b], [zero, zero, CGFloat(0.5)])

        Draw.HSLToRGB(h: 300.0 / 360.0, s: 1.0, l: 0.5, outR: &r, outG: &g, outB: &b) // magenta
        XCTAssertEqual(r, 1.0, accuracy: 1.0e-6)
        XCTAssertEqual(g, 0.0, accuracy: 1.0e-6)
        XCTAssertEqual(b, 1.0, accuracy: 1.0e-6)
        
        Draw.HSLToRGB(h: 0.5, s: 0.0, l: 0.75, outR: &r, outG: &g, outB: &b) // light gray
        XCTAssertEqual([r, g, b], [0.75, 0.75, 0.75])
    }
}
<commit_msg>small cleanup<commit_after>//
//  DrawTest.swift
//  BezierKit
//
//  Created by <NAME> on 8/6/18.
//  Copyright © 2018 <NAME>. All rights reserved.
//

import XCTest
@testable import BezierKit

class DrawTest: 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 testHSLToRGB() {
        var r: CGFloat = 0.0
        var g: CGFloat = 0.0
        var b: CGFloat = 0.0
        
        Draw.HSLToRGB(h: 0.0, s: 1.0, l: 0.5, outR: &r, outG: &g, outB: &b) // pure red
        XCTAssertEqual([r, g, b], [1.0, 0.0, 0.0])
        
        Draw.HSLToRGB(h: 240.0 / 360.0, s: 1.0, l: 0.25, outR: &r, outG: &g, outB: &b) // dark blue
        XCTAssertEqual([r, g, b], [0.0, 0.0, CGFloat(0.5)])

        Draw.HSLToRGB(h: 300.0 / 360.0, s: 1.0, l: 0.5, outR: &r, outG: &g, outB: &b) // magenta
        XCTAssertEqual(r, 1.0, accuracy: 1.0e-6)
        XCTAssertEqual(g, 0.0, accuracy: 1.0e-6)
        XCTAssertEqual(b, 1.0, accuracy: 1.0e-6)
        
        Draw.HSLToRGB(h: 0.5, s: 0.0, l: 0.75, outR: &r, outG: &g, outB: &b) // light gray
        XCTAssertEqual([r, g, b], [0.75, 0.75, 0.75])
    }
}

{'fraction_non_alphanumeric': 0.1556166265888011, 'fraction_numerical': 0.056338028169014086, 'mean_word_length': 1.914914914914915, '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': '2351185', 'n_tokens_mistral': 1262, 'n_tokens_neox': 1165, 'n_words': 342}