-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added more tests and added minimum requirements for OSes.
- Loading branch information
1 parent
43f967f
commit 4414e0e
Showing
10 changed files
with
144 additions
and
24 deletions.
There are no files selected for viewing
Binary file modified
BIN
+54.4 KB
(130%)
...tpm/xcode/package.xcworkspace/xcuserdata/mikeg.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// | ||
// TestHyperbolic.swift | ||
// BigDecimal | ||
// | ||
// Created by Mike Griebling on 11.10.2024. | ||
// | ||
|
||
import XCTest | ||
@testable import BigDecimal | ||
|
||
final class TestHyperbolic: XCTestCase { | ||
|
||
override func setUpWithError() throws { | ||
// Put setup code here. This method is called before the invocation of each test method in the class. | ||
} | ||
|
||
override func tearDownWithError() throws { | ||
// Put teardown code here. This method is called after the invocation of each test method in the class. | ||
} | ||
|
||
func testExample() throws { | ||
XCTAssertEqual(BigDecimal.sinh(.one).asString(), "1.175201193643801456882381850595601") | ||
XCTAssertEqual(BigDecimal.cosh(.one).asString(), "1.543080634815243778477905620757062") | ||
XCTAssertEqual(BigDecimal.tanh(.one).asString(), "0.7615941559557648881194582826047937") | ||
XCTAssertEqual(BigDecimal.asinh(BigDecimal.sinh(.one)).asString(), "1.000000000000000000000000000000000") | ||
XCTAssertEqual(BigDecimal.acosh(BigDecimal.cosh(.one)).asString(), "1.000000000000000000000000000000000") | ||
XCTAssertEqual(BigDecimal.atanh(BigDecimal.tanh(.one)).asString(), "1.000000000000000000000000000000000") | ||
} | ||
|
||
func testPerformanceExample() throws { | ||
// This is an example of a performance test case. | ||
self.measure { | ||
// Put the code you want to measure the time of here. | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// | ||
// TestTrig.swift | ||
// BigDecimal | ||
// | ||
// Created by Mike Griebling on 11.10.2024. | ||
// | ||
|
||
import XCTest | ||
@testable import BigDecimal | ||
|
||
final class TestTrig: XCTestCase { | ||
|
||
override func setUpWithError() throws { | ||
// Put setup code here. This method is called before the invocation of each test method in the class. | ||
} | ||
|
||
override func tearDownWithError() throws { | ||
// Put teardown code here. This method is called after the invocation of each test method in the class. | ||
} | ||
|
||
func testTrig() throws { | ||
let pi2 = BigDecimal.pi / 2 | ||
XCTAssertEqual(BigDecimal.sin(pi2).asString(), "0.8414709848078965066525023216302990") | ||
XCTAssertEqual(BigDecimal.cos(pi2).asString(), "0.5403023058681397174009366074429766") | ||
XCTAssertEqual(BigDecimal.tan(pi2).asString(), "1.557407724654902230506974807458360") | ||
XCTAssertEqual(BigDecimal.asin(BigDecimal.sin(pi2)).asString(), "1.000000000000000000000000000000000") | ||
XCTAssertEqual(BigDecimal.acos(BigDecimal.cos(pi2)).asString(), "1.000000000000000000000000000000000") | ||
XCTAssertEqual(BigDecimal.atan(BigDecimal.tan(pi2)).asString(), "0.9999999999999999999999999999999999") | ||
XCTAssertEqual(BigDecimal.atan2(y: .one, x: .ten).asString(), "0.09966865249116202737844611987802059") | ||
} | ||
|
||
func testPerformanceExample() throws { | ||
// This is an example of a performance test case. | ||
self.measure { | ||
// Put the code you want to measure the time of here. | ||
} | ||
} | ||
|
||
} |