<commit_before>//
//  SwiftTests.swift
//  NSData-FastHex
//
//  Created by <NAME> on 2015-05-14.
//  Copyright (c) 2015 <NAME>. All rights reserved.
//

import Cocoa
import XCTest

class SwiftTests: XCTestCase {
    func testSimpleEncodingDecoding() {
        var data = NSData(bytes:[0xDE, 0xAD, 0xBE, 0xEF, 0x42] as [UInt8], length:5)

        var hexString = data.hexString()
        XCTAssertEqual(hexString, "DEADBEEF42")

        var decoded = NSData(hexString: hexString)
        XCTAssertEqual(decoded, data)
    }
}<commit_msg>Tweak Swift NSData initialization<commit_after>//
//  SwiftTests.swift
//  NSData-FastHex
//
//  Created by <NAME> on 2015-05-14.
//  Copyright (c) 2015 <NAME>. All rights reserved.
//

import Cocoa
import XCTest

class SwiftTests: XCTestCase {
    func testSimpleEncodingDecoding() {
        var bytes: [UInt8] = [0xDE, 0xAD, 0xBE, 0xEF, 0x42]
        var data = NSData(bytes: bytes, length: bytes.count)

        var hexString = data.hexString()
        XCTAssertEqual(hexString, "DEADBEEF42")

        var decoded = NSData(hexString: hexString)
        XCTAssertEqual(decoded, data)
    }
}
{'fraction_non_alphanumeric': 0.12123893805309735, 'fraction_numerical': 0.03982300884955752, 'mean_word_length': 2.9270833333333335, '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': '4009555', 'n_tokens_mistral': 440, 'n_tokens_neox': 390, 'n_words': 97}