diff --git a/Math/Math/Vector.swift b/Math/Math/Vector.swift index a81a38a..53948a8 100644 --- a/Math/Math/Vector.swift +++ b/Math/Math/Vector.swift @@ -8,8 +8,6 @@ import Foundation -public typealias Float = Swift.Float - /** A vector. */ public protocol Vector { init() diff --git a/Math/MathTests/MatrixFunctionalTests.swift b/Math/MathTests/MatrixFunctionalTests.swift new file mode 100644 index 0000000..c28d2e2 --- /dev/null +++ b/Math/MathTests/MatrixFunctionalTests.swift @@ -0,0 +1,14 @@ +// +// MatrixFunctionalTests.swift +// Math +// +// Created by Eryn Wells on 11/6/15. +// Copyright © 2015 Eryn Wells. All rights reserved. +// + +import Foundation +import XCTest + +class MatrixVectorTests: XCTestCase { + func +} \ No newline at end of file diff --git a/Math/MathTests/MatrixTests.swift b/Math/MathTests/MatrixTests.swift index 3042c42..4c580cf 100644 --- a/Math/MathTests/MatrixTests.swift +++ b/Math/MathTests/MatrixTests.swift @@ -20,6 +20,19 @@ class Matrix4Tests: XCTestCase { XCTAssertEqual(Matrix4.count, 16) XCTAssertEqual(Matrix4().data.count, Matrix4.count) } + + func testThatInitThrowsForInvalidSizeOfValuesArray() { + do { + let m = try Matrix4(values: []) + -m + XCTFail() + } catch MatrixError.InvalidSize(let given, let expected) { + XCTAssertEqual(given, 0) + XCTAssertEqual(expected, Matrix4.count) + } catch { + XCTFail() + } + } } class Matrix4SubscriptTests: XCTestCase {