<commit_before>//
//  UUIDTests.swift
//  SwiftFoundation
//
//  Created by <NAME> on 7/2/15.
//  Copyright © 2015 PureSwift. All rights reserved.
//

import XCTest
import SwiftFoundation
import SwiftFoundation

final class UUIDTests: XCTestCase {
    
    lazy var allTests: [(String, () -> ())] =
        [("testCreateRandomUUID", self.testCreateRandomUUID),
        ("testUUIDString", self.testUUIDString),
        ("testCreateFromString", self.testCreateFromString)]
    
    // MARK: - Functional Tests

    func testCreateRandomUUID() {
        
        // try to create without crashing
        let uuid = UUID()
        
        print(uuid)
    }
    
    func testUUIDString() {
        
        let stringValue = "5bfeb194-68c4-48e8-8f43-3c586364cb6f".uppercaseString
        
        guard let uuid = UUID(rawValue: stringValue)
            else { XCTFail("Could not create UUID from " + stringValue); return }
        
        XCTAssert(uuid.rawValue == stringValue, "UUID is \(uuid), should be \(stringValue)")
    }
    
    func testCreateFromString() {
        
        let stringValue = "5bfeb194-68c4-48e8-8f43-3c586364cb6f".uppercaseString
        
        XCTAssert((UUID(rawValue: stringValue) != nil), "Could not create UUID with string \"\(stringValue)\"")
        <commit_msg>made UUID strings upper case<commit_after>//
//  UUIDTests.swift
//  SwiftFoundation
//
//  Created by <NAME> on 7/2/15.
//  Copyright © 2015 PureSwift. All rights reserved.
//

import XCTest
import SwiftFoundation
import SwiftFoundation

final class UUIDTests: XCTestCase {
    
    lazy var allTests: [(String, () -> ())] =
        [("testCreateRandomUUID", self.testCreateRandomUUID),
        ("testUUIDString", self.testUUIDString),
        ("testCreateFromString", self.testCreateFromString)]
    
    // MARK: - Functional Tests

    func testCreateRandomUUID() {
        
        // try to create without crashing
        let uuid = UUID()
        
        print(uuid)
    }
    
    func testUUIDString() {
        
        let stringValue = "5BFEB194-68C4-48E8-8F43-3C586364CB6F"
        
        guard let uuid = UUID(rawValue: stringValue)
            else { XCTFail("Could not create UUID from " + stringValue); return }
        
        XCTAssert(uuid.rawValue == stringValue, "UUID is \(uuid), should be \(stringValue)")
    }
    
    func testCreateFromString() {
        
        let stringValue = "5BFEB194-68C4-48E8-8F43-3C586364CB6F"
        
        XCTAssert((UUID(rawValue: stringValue) != nil), "Could not create UUID with string \"\(stringValue)\"")
        
{'fraction_non_alphanumeric': 0.11304684475416182, 'fraction_numerical': 0.03871467286101433, 'mean_word_length': 2.3001277139208174, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3809468', 'n_tokens_mistral': 858, 'n_tokens_neox': 801, 'n_words': 184}