[tests] iOS9 (beta) have fixed bug #27864, adjust test
authorSebastien Pouliot <sebastien@xamarin.com>
Wed, 29 Jul 2015 20:45:15 +0000 (16:45 -0400)
committerSebastien Pouliot <sebastien@xamarin.com>
Wed, 29 Jul 2015 20:45:15 +0000 (16:45 -0400)
mcs/class/Mono.Data.Sqlite/Test/Bug27864.cs

index a3a5376e48c330eeb01ca2ea8c0d9084e9e3ff65..d64d3055b999b36e07e8ba66aeed04a5aba275c0 100644 (file)
@@ -92,14 +92,12 @@ namespace MonoTests.Mono.Data.Sqlite {
                                                        Assert.AreEqual(dr["Company.Name"], "Test CO");
                                                        i += 2;
                                                }
-                                               Assert.IsTrue(dr.FieldCount>0);
+                                               Assert.IsTrue(dr.FieldCount>0, i.ToString ());
                                        }
-                                       if (BCL.Tests.TestRuntime.CheckSystemVersion (8, 2))
-                                               Assert.IsTrue (false, "Apple fixed bug 27864, this check can now be removed");
                                }
                        } catch (SqliteException ex) {
-
-                               if (BCL.Tests.TestRuntime.CheckSystemVersion (8, 2)) // Expected Exception on iOS 8.2+, if this does not happen anymore it means apple fixed it
+                               // Expected Exception from iOS 8.2 (broken) to 9.0 (fixed)
+                               if (BCL.Tests.TestRuntime.CheckSystemVersion (8,2) && !BCL.Tests.TestRuntime.CheckSystemVersion (9,0)) 
                                        Assert.That (ex.Message.Contains ("no such column: com.Name"));
                                else
                                        throw new AssertionException ("Unexpected Sqlite Error", ex); // This should not happen