forked from tectronics/swift-magic-pills
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5556d11
commit 37e5b0f
Showing
5 changed files
with
33 additions
and
4 deletions.
There are no files selected for viewing
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,19 @@ | ||
import XCTest | ||
import Foundation | ||
import MasMagicPills | ||
|
||
class Int64ExtensionsTests: XCTestCase { | ||
func test_static_helpers() { | ||
let sixGigaBytes = Int64.gigaBytes(6) | ||
XCTAssertEqual(sixGigaBytes, 6 * 1_024 * 1_024 * 1_024) | ||
|
||
let twentyFiveMegaBytes = Int64.megaBytes(25) | ||
XCTAssertEqual(twentyFiveMegaBytes, 25 * 1_024 * 1_024) | ||
} | ||
|
||
func test_int_to_string_conversion() { | ||
XCTAssertEqual((24 as Int64).toString, "24") | ||
XCTAssertEqual((1_024 as Int64).toString, "1024") | ||
XCTAssertNotEqual((1_024 as Int64).toString, "10") | ||
} | ||
} |