<commit_before>import XCTest

import CoreGraphics
import JetPack


class CGFloat_Tests: XCTestCase {

	func testConstants() {
		XCTAssertEqual(CGFloat.Epsilon, CGFloat(CGFloat.NativeType.Epsilon))
		XCTAssertEqual(CGFloat.Pi,      CGFloat(3.1415926535897932384626433832))
	}


	func testRound() {
		XCTAssertEqual(CGFloat(-0.9).round, -1)
		XCTAssertEqual(CGFloat(-0.5).round, -1)
		XCTAssertEqual(CGFloat(-0.1).round,  0)
		XCTAssertEqual(CGFloat( 0.0).round,  0)
		XCTAssertEqual(CGFloat( 0.1).round,  0)
		XCTAssertEqual(CGFloat( 0.5).round,  1)
		XCTAssertEqual(CGFloat( 0.9).round,  1)
	}
}<commit_msg>fixed tests<commit_after>import XCTest

import CoreGraphics
import JetPack


class CGFloat_Tests: XCTestCase {

	func testConstants() {
		XCTAssertEqual(CGFloat.Epsilon, CGFloat(CGFloat.NativeType.Epsilon))
		XCTAssertEqual(CGFloat.Pi,      CGFloat(3.1415926535897932384626433832))
	}


	func testRounded() {
		XCTAssertEqual(CGFloat(-0.9).rounded, -1)
		XCTAssertEqual(CGFloat(-0.5).rounded, -1)
		XCTAssertEqual(CGFloat(-0.1).rounded,  0)
		XCTAssertEqual(CGFloat( 0.0).rounded,  0)
		XCTAssertEqual(CGFloat( 0.1).rounded,  0)
		XCTAssertEqual(CGFloat( 0.5).rounded,  1)
		XCTAssertEqual(CGFloat( 0.9).rounded,  1)
	}


	func testRoundedDown() {
		XCTAssertEqual(CGFloat(-0.9).roundedDown, -1)
		XCTAssertEqual(CGFloat(-0.5).roundedDown, -1)
		XCTAssertEqual(CGFloat(-0.1).roundedDown, -1)
		XCTAssertEqual(CGFloat( 0.0).roundedDown,  0)
		XCTAssertEqual(CGFloat( 0.1).roundedDown,  0)
		XCTAssertEqual(CGFloat( 0.5).roundedDown,  0)
		XCTAssertEqual(CGFloat( 0.9).roundedDown,  0)
	}


	func testRoundedUp() {
		XCTAssertEqual(CGFloat(-0.9).roundedUp, 0)
		XCTAssertEqual(CGFloat(-0.5).roundedUp, 0)
		XCTAssertEqual(CGFloat(-0.1).roundedUp, 0)
		XCTAssertEqual(CGFloat( 0.0).roundedUp, 0)
		XCTAssertEqual(CGFloat( 0.1).roundedUp, 1)
		XCTAssertEqual(CGFloat( 0.5).roundedUp, 1)
		XCTAssertEqual(CGFloat( 0.9).roundedUp, 1)
	}
}
{'fraction_non_alphanumeric': 0.14492006188757092, 'fraction_numerical': 0.07323362558019597, 'mean_word_length': 4.9327217125382266, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5210208', 'n_tokens_mistral': 916, 'n_tokens_neox': 828, 'n_words': 111}