@@ -30,14 +30,12 @@ type Array2Module() =
3030if i= 0 then System.Math.Sin( arg) else System.Math.Cos( arg))
3131let resultInt = Array2D.base1 intArr
3232if resultInt<> 0 then Assert.Fail()
33- #if FX_ NO_ BASED_ ARRAYS
34- #else
33+
3534// string array
3635let strArr = Array2D.createBased0 0 2 3 " goodboy"
3736let resultStr = Array2D.base1 strArr
3837if resultStr<> 0 then Assert.Fail()
39- #endif
40-
38+
4139// empty array
4240let eptArr = Array2D.create0 0 1
4341let resultEpt = Array2D.base1 eptArr
@@ -60,13 +58,11 @@ type Array2Module() =
6058let resultInt = Array2D.base2 intArr
6159if resultInt<> 0 then Assert.Fail()
6260
63- #if ! FX_ NO_ BASED_ ARRAYS
6461// string array
6562let strArr = Array2D.createBased0 0 2 3 " goodboy"
6663let resultStr = Array2D.base2 strArr
6764if resultStr<> 0 then Assert.Fail()
68- #endif
69-
65+
7066// empty array
7167let eptArr = Array2D.create0 0 1
7268let resultEpt = Array2D.base2 eptArr
@@ -76,13 +72,11 @@ type Array2Module() =
7672let nullArr = null : string[,]
7773 CheckThrowsNullRefException( fun () -> Array2D.base2 nullArr|> ignore)
7874
79- #if ! FX_ NO_ BASED_ ARRAYS
8075// Verify printing format of non-zero based arrays
8176let v : int [,] = Array2D.createBased10 1 3 4 2
8277let actual = ( sprintf" %A " v) .Replace( " \r " , " " ) .Replace( " \n " , " " )
8378let expected = " [bound1=10 bound2=1 [2; 2; 2; 2] [2; 2; 2; 2] [2; 2; 2; 2]]"
8479 Assert.AreEqual( expected, actual)
85- #endif
8680()
8781
8882[<Test>]
@@ -131,7 +125,6 @@ type Array2Module() =
131125 CheckThrowsArgumentException( fun () -> Array2D.blit intArr0 0 intArr20 10 2 2 |> ignore)
132126()
133127
134- #if ! FX_ NO_ BASED_ ARRAYS
135128[<Test>]
136129member this.BlitWithNonZeroBase () =
137130let a = Array2D.createBased1 1 3 3 0
@@ -184,7 +177,6 @@ type Array2Module() =
184177 CheckThrowsArgumentException( fun () -> Array2D.blit a1 1 b1 1 4 4 |> ignore)
185178
186179()
187- #endif
188180
189181[<Test>]
190182member this.Copy () =
@@ -230,7 +222,6 @@ type Array2Module() =
230222
231223()
232224
233- #if ! FX_ NO_ BASED_ ARRAYS
234225[<Test>]
235226member this.createBased () =
236227// integer array
@@ -249,7 +240,6 @@ type Array2Module() =
249240let resultEpt = Array2D.createBased0 0 0 0 1
250241if resultEpt<> eptArrthen Assert.Fail()
251242()
252- #endif
253243
254244[<Test>]
255245member this.Get () =
@@ -285,26 +275,21 @@ type Array2Module() =
285275let intArr = Array2D.init2 3 ( fun i j -> i* 100 + j)
286276if intArr.[ 1 , 1 ] <> 101 then Assert.Fail()
287277
288-
289278// string array
290279let strArr = Array2D.init2 3 ( fun i j -> i.ToString() + " -" + j.ToString())
291280if strArr.[ 1 , 1 ] <> " 1-1" then Assert.Fail()
292281()
293-
294- #if ! FX_ NO_ BASED_ ARRAYS
282+
295283[<Test>]
296284member this.Init_Based () =
297285// integer array
298286let intArr = Array2D.initBased1 1 2 3 ( fun i j -> i* 100 + j)
299287if intArr.[ 2 , 2 ] <> 202 then Assert.Fail()
300288
301-
302289// string array
303290let strArr = Array2D.initBased1 1 2 3 ( fun i j -> i.ToString() + " -" + j.ToString())
304291if strArr.[ 2 , 2 ] <> " 2-2" then Assert.Fail()
305-
306292()
307- #endif
308293
309294[<Test>]
310295member this.Iter () =
@@ -331,7 +316,6 @@ type Array2Module() =
331316 CheckThrowsArgumentNullException( fun () -> Array2D.iter funStr nullArr|> ignore)
332317()
333318
334- #if ! FX_ NO_ BASED_ ARRAYS
335319[<Test>]
336320member this.IterNonZeroBased () =
337321let a = Array2D.createBased1 5 10 10 1
@@ -343,8 +327,6 @@ type Array2Module() =
343327if ! result<> 1600 then Assert.Fail()
344328()
345329
346- #endif
347-
348330[<Test>]
349331member this.Iteri () =
350332// integer array
@@ -470,7 +452,6 @@ type Array2Module() =
470452
471453()
472454
473- #if ! FX_ NO_ BASED_ ARRAYS
474455[<Test>]
475456member this.Rebase () =
476457// integer array
@@ -494,7 +475,6 @@ type Array2Module() =
494475 CheckThrowsArgumentNullException( fun () -> Array2D.rebase nullArr|> ignore)
495476
496477()
497- #endif
498478
499479[<Test>]
500480member this.Set () =