diff options
author | Alexander Köplinger <alex.koeplinger@outlook.com> | 2016-10-29 14:54:08 +0300 |
---|---|---|
committer | Alexander Köplinger <alex.koeplinger@outlook.com> | 2016-10-29 15:09:36 +0300 |
commit | 892cd5263622b234777804d71823f22af02ada2b (patch) | |
tree | f72284bd178c02a1ba324b74231e03b25075ef15 /mcs/class/System.Data.Linq | |
parent | 2550144e79a3cda870c51c8721f0796c53397dfd (diff) |
[System.Data.Linq] Fix "build" subdirectory to work with nunitlite
TODO: we should refactor this, seems crazy to have a frankencopy of the test machinery in this folder.
Diffstat (limited to 'mcs/class/System.Data.Linq')
5 files changed, 12 insertions, 9 deletions
diff --git a/mcs/class/System.Data.Linq/build/.gitignore b/mcs/class/System.Data.Linq/build/.gitignore new file mode 100644 index 00000000000..f2cf7dc6652 --- /dev/null +++ b/mcs/class/System.Data.Linq/build/.gitignore @@ -0,0 +1,2 @@ +Northwind.db3 + diff --git a/mcs/class/System.Data.Linq/build/DbLinq.Sqlite_test_mono_strict.dll.sources b/mcs/class/System.Data.Linq/build/DbLinq.Sqlite_test_mono_strict.dll.sources index 1079699a00f..22f797c60f4 100644 --- a/mcs/class/System.Data.Linq/build/DbLinq.Sqlite_test_mono_strict.dll.sources +++ b/mcs/class/System.Data.Linq/build/DbLinq.Sqlite_test_mono_strict.dll.sources @@ -1,3 +1,4 @@ +../../test-helpers/NunitHelpers.cs ../examples/DbLinq.SQLite.Example/nwind/Northwind.cs ../src/DbLinq.Sqlite/Test/DirectDataContext.cs ../src/DbLinq.Sqlite/Test/TestBase_mono.cs diff --git a/mcs/class/System.Data.Linq/build/Makefile b/mcs/class/System.Data.Linq/build/Makefile index 27b0c9e70c8..71e2154664a 100644 --- a/mcs/class/System.Data.Linq/build/Makefile +++ b/mcs/class/System.Data.Linq/build/Makefile @@ -25,14 +25,14 @@ sqlite_tests_dep = \ $(sqlite_tests): $(sqlite_tests_dep) $(TEST_COMPILE) -target:library -out:$@ \ - -r:System.Data.dll -r:$(the_assembly) -r:Mono.Data.Sqlite $(test_nunit_ref) \ + -r:$(topdir)/class/lib/$(PROFILE)/System.Data.dll -r:$(the_assembly) -r:$(topdir)/class/lib/$(PROFILE)/Mono.Data.Sqlite.dll -r:$(topdir)/class/lib/$(PROFILE)/System.Core.dll -r:$(topdir)/class/lib/$(PROFILE)/System.dll -r:$(topdir)/class/lib/$(PROFILE)/System.Xml.dll $(test_nunit_ref) \ $(TEST_MCS_FLAGS) -d:MONO_STRICT -d:SQLITE \ @$< $(TEST_SOURCES_WITH_SPACES) test-sqlite: $(sqlite_tests) RUN_TEST_COMMAND = \ - MONO_REGISTRY_PATH="$(HOME)/.mono/registry" $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(TEST_HARNESS) $(1) -noshadow $(TEST_HARNESS_FLAGS) $(LOCAL_TEST_HARNESS_FLAGS) $(TEST_HARNESS_EXCLUDES) $(TEST_HARNESS_OUTPUT) -xml=TestResult-$(1:.dll=)-$(PROFILE).xml -out:TestResult-$(1:.dll=)-$(PROFILE).out $(FIXTURE_ARG) $(TESTNAME_ARG) ; + MONO_REGISTRY_PATH="$(HOME)/.mono/registry" $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(TEST_HARNESS) $(1) $(TEST_HARNESS_FLAGS) $(LOCAL_TEST_HARNESS_FLAGS) $(TEST_HARNESS_EXCLUDES) $(TEST_HARNESS_OUTPUT) -labels -format:nunit2 -result=TestResult-$(1:.dll=)-$(PROFILE).xml $(FIXTURE_ARG) $(TESTNAME_ARG) ; run-test-sqlite: $(call RUN_TEST_COMMAND,$(sqlite_tests)) diff --git a/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/ReadTest.cs b/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/ReadTest.cs index 71762345002..efde50c3dcc 100644 --- a/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/ReadTest.cs +++ b/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/ReadTest.cs @@ -443,7 +443,7 @@ namespace nwind select p;
int count = q.Count();
- Assert.Less(count, db.Customers.Count());
+ AssertHelper.Less(count, db.Customers.Count());
}
[Test]
@@ -455,7 +455,7 @@ namespace nwind select p;
int count = q.Count();
- Assert.Less(count, db.Customers.Count());
+ AssertHelper.Less(count, db.Customers.Count());
}
[Test]
@@ -496,7 +496,7 @@ namespace nwind }
[Test]
- [ExpectedException(ExceptionType=typeof(InvalidOperationException), ExpectedMessage="Data context options cannot be modified after results have been returned from a query.")]
+ [ExpectedException(typeof(InvalidOperationException), ExpectedMessage="Data context options cannot be modified after results have been returned from a query.")]
public void C13_Changing_ObjectTrackingEnabled2False()
{
Northwind db = CreateDB();
@@ -507,7 +507,7 @@ namespace nwind }
[Test]
- [ExpectedException(ExceptionType = typeof(InvalidOperationException), ExpectedMessage = "Data context options cannot be modified after results have been returned from a query.")]
+ [ExpectedException(typeof(InvalidOperationException), ExpectedMessage = "Data context options cannot be modified after results have been returned from a query.")]
public void C14_Changing_DeferredLoadingEnabled2False()
{
Northwind db = CreateDB();
@@ -518,7 +518,7 @@ namespace nwind }
[Test]
- [ExpectedException(ExceptionType = typeof(InvalidOperationException), ExpectedMessage = "Object tracking is not enabled for the current data context instance.")]
+ [ExpectedException(typeof(InvalidOperationException), ExpectedMessage = "Object tracking is not enabled for the current data context instance.")]
public void C15_SubmitChanges_DeferredLoadingEnabled_False()
{
Northwind db = CreateDB();
@@ -902,7 +902,7 @@ namespace nwind {
//int compareNames = prevProductName.CompareTo(p.ProductName);
int compareNames = string.Compare(prevProductName, p.ProductName, stringComparisonType);
- Assert.Less(compareNames, 0, "When ordering by names, expected " + prevProductName + " to come after " + p.ProductName);
+ AssertHelper.Less(compareNames, 0, "When ordering by names, expected " + prevProductName + " to come after " + p.ProductName);
}
prevProductName = p.ProductName;
}
diff --git a/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/TestBase.cs b/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/TestBase.cs index e593fc37c6e..ba0734df607 100644 --- a/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/TestBase.cs +++ b/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/TestBase.cs @@ -33,7 +33,7 @@ using NUnit.Framework; using nwind;
-#if MONO_STRICT && !MONO
+#if MONO_STRICT
using System.Diagnostics;
public static class Profiler
{
|