@@ -13,12 +13,12 @@ import MGTools
1313@testable import BigNumber
1414
1515class BIntTests : XCTestCase {
16-
16+
1717 override func setUp( ) {
1818 super. setUp ( )
1919 // Put setup code here. This method is called before the invocation of each test method in the class.
2020 }
21-
21+
2222 override func tearDown( ) {
2323 // Put teardown code here. This method is called after the invocation of each test method in the class.
2424 super. tearDown ( )
@@ -32,7 +32,7 @@ class BIntTests: XCTestCase {
3232 " y " , " z " , " A " , " B " , " C " , " D " , " E " , " F " , " G " , " H " , " I " , " J " , " K " , " L " , " M " , " N " , " O " ,
3333 " P " , " Q " , " R " , " S " , " T " , " U " , " V " , " W " , " X " , " Y " , " Z "
3434 ]
35-
35+
3636 // Randomly choose two bases and a number length, as well as a sign (+ or -)
3737 for _ in 0 ..< 100
3838 {
@@ -77,7 +77,7 @@ class BIntTests: XCTestCase {
7777 XCTAssert ( BInt ( " 0 " , radix: 16 ) ! <= 1.0 )
7878 XCTAssert ( BInt ( " f " , radix: 16 ) ! >= 1.0 )
7979 XCTAssert ( BInt ( " rfff " , radix: 16 ) == nil )
80-
80+
8181 XCTAssert ( BInt ( " ffff " , radix: 16 ) == 65535 )
8282 XCTAssert ( BInt ( " rfff " , radix: 16 ) == nil )
8383 XCTAssert ( BInt ( " ff " , radix: 10 ) == nil )
@@ -97,7 +97,7 @@ class BIntTests: XCTestCase {
9797 XCTAssert ( BInt ( " 4 " , radix: 5 ) ! >= 1.0 )
9898 XCTAssert ( BInt ( " 923492349 " , radix: 32 ) ! == 9967689075849 )
9999 }
100-
100+
101101 func testIntInit( ) {
102102 XCTAssert ( BInt ( UInt64 . max) == UInt64 . max)
103103 XCTAssert ( BInt ( Int64 . max) == Int64 . max)
@@ -115,7 +115,7 @@ class BIntTests: XCTestCase {
115115 XCTAssert ( BInt ( Int . max) == Int . max)
116116 XCTAssert ( BInt ( Int . min) == Int . min)
117117 }
118-
118+
119119 func testNotEqual( ) {
120120 XCTAssert ( BInt ( Int64 . max) != Int64 . min)
121121 XCTAssert ( BInt ( Int64 . max) != 0 )
@@ -138,23 +138,23 @@ class BIntTests: XCTestCase {
138138 XCTAssert ( BInt ( Int . min) != Int . max)
139139 XCTAssert ( BInt ( Int . min) != 0 )
140140 }
141-
141+
142142 func testPerformanceStringInit( ) {
143143 self . measure {
144144 for _ in ( 0 ... 15000 ) {
145145 let _ = BInt ( String ( UInt32 . random ( in: 0 ..< UInt32 . max) ) )
146146 }
147147 }
148148 }
149-
149+
150150 func testPerformanceStringRadixInit( ) {
151151 self . measure {
152152 for _ in ( 0 ... 15000 ) {
153153 let _ = BInt ( String ( UInt32 . random ( in: 0 ..< UInt32 . max) ) , radix: 10 )
154154 }
155155 }
156156 }
157-
157+
158158 /** An issue was reported where a hex string was not being converted to a decimal. This test case checks that. */
159159 func testIssue58( ) throws {
160160 // 190000000000000000000
@@ -168,11 +168,11 @@ class BIntTests: XCTestCase {
168168 XCTAssertGreaterThan ( x, BInt ( Int32 . max) )
169169 XCTAssertEqual ( x, BInt ( " 190000000000000000000 " ) )
170170 }
171-
171+
172172 func testIssue67( ) throws {
173173 let x = try XCTUnwrap ( BInt ( " 0b1310c5a2c30000 " , radix: 16 ) )
174174 XCTAssertEqual ( x, BInt ( " 0x0b1310c5a2c30000 " , radix: 16 ) )
175-
175+
176176 let y = try XCTUnwrap ( BInt ( " 0b " , radix: 16 ) )
177177 XCTAssertEqual ( y, 11 )
178178 XCTAssertEqual ( y, BInt ( " 0xb " , radix: 16 ) )
0 commit comments