[Mono-devel-list] Mono.Directory.LDAP NUnit 2.0 Test conversion
Martin Willemoes Hansen
mwh at sysrq.dk
Wed Mar 12 09:57:10 EST 2003
Hi!
Conversion of Mono.Directory.LDAP assembly done, ill commit later
tonight, if nobody objects ;)
--
Martin Willemoes Hansen
--------------------------------------------------------
E-Mail mwh at sysrq.dk Website mwh.sysrq.dk
IRC MWH, freenode.net
--------------------------------------------------------
-------------- next part --------------
Index: ChangeLog
===================================================================
RCS file: /cvs/public/mcs/class/Mono.Directory.LDAP/ChangeLog,v
retrieving revision 1.3
diff -u -r1.3 ChangeLog
--- ChangeLog 11 Dec 2002 18:32:10 -0000 1.3
+++ ChangeLog 12 Mar 2003 14:48:42 -0000
@@ -1,3 +1,11 @@
+2003-03-12 Martin Willemoes Hansen <mwh at sysrq.dk>
+ * NUnit2ified makefile.gnu, Test/dslib_linux_test.args
+ Test/makefile.gnu, Test/Mono.Directory.LDAP/BindSimpleTest.cs
+ Test/Mono.Directory.LDAP/QueryRootDSE.cs
+ * Renamed Test/Mono.Directory.LDAP/QueryRootDSE.cs to QueryRootDSETest.cs
+ * Removed Test/NUnit.Prefs, Test/Mono.Directory.LDAP/AllTests.cs
+ * Fixed Mono.Directory.LDAP/LDAP.cs casting of null to object.
+
2002-12-11 Jeroen Janssen <japj at darius.demon.nl>
* add reference to corlib.dll in order to eliminate [MonoTODO] build error
Index: makefile.gnu
===================================================================
RCS file: /cvs/public/mcs/class/Mono.Directory.LDAP/makefile.gnu,v
retrieving revision 1.1
diff -u -r1.1 makefile.gnu
--- makefile.gnu 16 Sep 2002 21:26:14 -0000 1.1
+++ makefile.gnu 12 Mar 2003 14:48:42 -0000
@@ -1,14 +1,14 @@
topdir = ../..
-LIBRARY = ../lib/Mono.Directory.LDAP.dll
+TEST_DIR= Test
+LIBRARY = $(topdir)/class/lib/Mono.Directory.LDAP.dll
LIB_LIST = list
LIB_FLAGS = -r corlib -r System -r System.Data -r mscorlib
SOURCES_INCLUDE=*.cs
-SOURCES_EXCLUDE=\
- ./Test*
+SOURCES_EXCLUDE=./Test*
-export MONO_PATH_PREFIX = ../lib:
+export MONO_PATH_PREFIX = $(topdir)/class/lib:
-include ../library.make
+include $(topdir)/class/library.make
Index: Mono.Directory.LDAP/LDAP.cs
===================================================================
RCS file: /cvs/public/mcs/class/Mono.Directory.LDAP/Mono.Directory.LDAP/LDAP.cs,v
retrieving revision 1.1
diff -u -r1.1 LDAP.cs
--- Mono.Directory.LDAP/LDAP.cs 16 Sep 2002 21:26:14 -0000 1.1
+++ Mono.Directory.LDAP/LDAP.cs 12 Mar 2003 14:48:42 -0000
@@ -61,7 +61,7 @@
public int StartTLS () {
// FIXME should expose client/server ctrls
- return ldap_start_tls_s (ld, (IntPtr)null, (IntPtr)null);
+ return ldap_start_tls_s (ld, IntPtr.Zero, IntPtr.Zero);
}
public int Search (string base_entry,
@@ -92,10 +92,9 @@
return rv;
}
-
public void Unbind () {
// FIXME should expose client/server ctrls
- ldap_unbind_ext_s (ld, (IntPtr)null, (IntPtr)null);
+ ldap_unbind_ext_s (ld, IntPtr.Zero, IntPtr.Zero);
// FIXME throw something here if ldap_unbind_ext_s returns an error
}
Index: Test/dslib_linux_test.args
===================================================================
RCS file: /cvs/public/mcs/class/Mono.Directory.LDAP/Test/dslib_linux_test.args,v
retrieving revision 1.1
diff -u -r1.1 dslib_linux_test.args
--- Test/dslib_linux_test.args 16 Sep 2002 21:26:14 -0000 1.1
+++ Test/dslib_linux_test.args 12 Mar 2003 14:48:42 -0000
@@ -1,10 +1,2 @@
---target library
--o dslib_linux_test.dll
---noconfig
--r ../../lib/Mono.Directory.LDAP.dll
--r ../../lib/corlib.dll
--r ../../lib/System.dll
--r ../../../nunit/NUnitCore_mono.dll
Mono.Directory.LDAP/BindSimpleTest.cs
-Mono.Directory.LDAP/QueryRootDSE.cs
-Mono.Directory.LDAP/AllTests.cs
+Mono.Directory.LDAP/QueryRootDSETest.cs
Index: Test/makefile.gnu
===================================================================
RCS file: /cvs/public/mcs/class/Mono.Directory.LDAP/Test/makefile.gnu,v
retrieving revision 1.1
diff -u -r1.1 makefile.gnu
--- Test/makefile.gnu 16 Sep 2002 21:26:14 -0000 1.1
+++ Test/makefile.gnu 12 Mar 2003 14:48:42 -0000
@@ -3,21 +3,26 @@
LIBRARY = dslib_linux_test.dll
LIB_LIST = dslib_linux_test.args
-LIB_FLAGS = -r ../../lib/Mono.Directory.LDAP.dll -r ../../lib/corlib.dll -r ../../lib/System.dll \
- -r $(topdir)/nunit/src/NUnitCore/NUnitCore_mono.dll
+LIB_FLAGS = \
+ -r $(topdir)/class/lib/corlib.dll \
+ -r $(topdir)/class/lib/System.dll \
+ -r $(topdir)/class/lib/Mono.Directory.LDAP.dll \
+ -r $(topdir)/nunit20/NUnit.Framework.dll
+
+ifdef SUBDIR
+USE_SOURCE_RULES=1
+SOURCES_INCLUDE=./$(SUBDIR)/*.cs
+SOURCES_EXCLUDE=_DUMMY_
+endif
-include ../../library.make
+include $(topdir)/class/library.make
-MCS_FLAGS = --target library --noconfig
-
-TEST_SUITE_PREFIX = MonoTests.Directory.LDAP.
-TEST_SUITE = AllTests
-NUNITCONSOLE=$(topdir)/nunit/src/NUnitConsole/NUnitConsole_mono.exe
-NUNIT_MONO_PATH=$(topdir)/nunit/src/NUnitCore:.
+NUNITCONSOLE=$(topdir)/nunit20/nunit-console.exe
+MONO_PATH = $(topdir)/nunit20:.
test: $(LIBRARY) run_test
.PHONY: run_test
run_test:
- MONO_PATH=$(NUNIT_MONO_PATH) mono $(NUNITCONSOLE) $(TEST_SUITE_PREFIX)$(TEST_SUITE),dslib_linux_test.dll
+ -MONO_PATH=$(MONO_PATH) mono --debug $(NUNITCONSOLE) $(LIBRARY)
Index: Test/Mono.Directory.LDAP/BindSimpleTest.cs
===================================================================
RCS file: /cvs/public/mcs/class/Mono.Directory.LDAP/Test/Mono.Directory.LDAP/BindSimpleTest.cs,v
retrieving revision 1.1
diff -u -r1.1 BindSimpleTest.cs
--- Test/Mono.Directory.LDAP/BindSimpleTest.cs 16 Sep 2002 21:26:14 -0000 1.1
+++ Test/Mono.Directory.LDAP/BindSimpleTest.cs 12 Mar 2003 14:48:42 -0000
@@ -1,3 +1,4 @@
+// BindSimpleTest.cs
using NUnit.Framework;
using System;
@@ -5,26 +6,18 @@
namespace MonoTests.Directory.LDAP
{
- public class BindSimpleTest : TestCase {
- public BindSimpleTest () :
- base ("[MonoTests.Directory.LDAP.BindSimpleTest]'") {}
+ [TestFixture]
+ public class BindSimpleTest {
- public BindSimpleTest (string name) :
- base (name) {}
+ [SetUp]
+ public void GetReady () {}
- protected override void SetUp () {}
+ [TearDown]
+ public void Clear () {}
- protected override void TearDown () {}
-
- public static ITest Suite
+ [Test]
+ public void Stuff()
{
- get {
- return new TestSuite (typeof (BindSimpleTest));
- }
- }
-
-
- public void TestStuff() {
string myLDAPPath = "ldap://ldap.toshok.org";
string username = "cn=Manager,dc=toshok,dc=org", passwd = "evotest";
try {
More information about the Mono-devel-list
mailing list