[Galago-commits] r2682 - in trunk/galago-sharp: . galago tests
galago-commits at freedesktop.org
galago-commits at freedesktop.org
Thu Apr 6 02:00:06 PDT 2006
Author: chipx86
Date: 2006-04-06 02:00:02 -0700 (Thu, 06 Apr 2006)
New Revision: 2682
Modified:
trunk/galago-sharp/ChangeLog
trunk/galago-sharp/galago/Makefile.am
trunk/galago-sharp/tests/unit-tests.cs
Log:
- Add a sed expression to remove a stupid check that the gapi generator apparently feels is necessary when checking the return value of the priority account signal handlers. It was throwing an exception if the returned value was null, but we wanted to allow this. The sed script just replaces the throw with a comment.
- Beef up the unit tests a bit.
Modified: trunk/galago-sharp/ChangeLog
===================================================================
--- trunk/galago-sharp/ChangeLog 2006-04-06 08:57:54 UTC (rev 2681)
+++ trunk/galago-sharp/ChangeLog 2006-04-06 09:00:02 UTC (rev 2682)
@@ -1,3 +1,14 @@
+Thu Apr 06 01:58:11 PDT 2006 Christian Hammond <chipx86 at chipx86.com>
+
+ * galago/Makefile.am:
+ * tests/unit-tests.cs:
+ - Add a sed expression to remove a stupid check that the gapi generator
+ apparently feels is necessary when checking the return value of the
+ priority account signal handlers. It was throwing an exception if
+ the returned value was null, but we wanted to allow this. The sed
+ script just replaces the throw with a comment.
+ - Beef up the unit tests a bit.
+
Wed Apr 05 02:40:18 PDT 2006 Christian Hammond <chipx86 at chipx86.com>
A galago/Person.custom:
Modified: trunk/galago-sharp/galago/Makefile.am
===================================================================
--- trunk/galago-sharp/galago/Makefile.am 2006-04-06 08:57:54 UTC (rev 2681)
+++ trunk/galago-sharp/galago/Makefile.am 2006-04-06 09:00:02 UTC (rev 2682)
@@ -54,6 +54,7 @@
$(GAPI_CODEGEN) --generate $(API) \
--include $(INCLUDE_API) --outdir=generated --customdir=$(srcdir) \
--assembly-name=$(ASSEMBLY_NAME) \
+ && sed -i -e '/static IntPtr CalcPriorityAccountSignalCallback/,/return/ { s/throw new Exception("args.RetVal unset in callback");/; \/\/ This is perfectly safe. Ignore this./ }' generated/Core.cs \
&& touch generated-stamp
$(ASSEMBLY): $(build_sources) generated-stamp galago-sharp.snk
Modified: trunk/galago-sharp/tests/unit-tests.cs
===================================================================
--- trunk/galago-sharp/tests/unit-tests.cs 2006-04-06 08:57:54 UTC (rev 2681)
+++ trunk/galago-sharp/tests/unit-tests.cs 2006-04-06 09:00:02 UTC (rev 2682)
@@ -1,6 +1,7 @@
namespace Galago.Tests
{
using NUnit.Framework;
+ using System;
public class Utils
{
@@ -181,8 +182,9 @@
Galago.Account priorityAccount = person.PriorityAccount;
- Assert.IsNotNull(priorityAccount);
- Assert.AreEqual(priorityAccount, account2);
+ Assert.IsNotNull(priorityAccount, "Priority account is null");
+ Assert.AreEqual(priorityAccount, account2,
+ "Priority account was not account 2");
// Test with a dummy handler.
Galago.Global.Core.CalcPriorityAccount += DummyCalcPriorityAccount;
@@ -192,8 +194,9 @@
"Priority account was not account 2");
Galago.Global.Core.CalcPriorityAccount -= DummyCalcPriorityAccount;
- // Test with a dummy handler.
+ // Test with a custom handler.
Galago.Global.Core.CalcPriorityAccount += CustomCalcPriorityAccount;
+
priorityAccount = person.PriorityAccount;
Assert.IsNotNull(priorityAccount, "Priority account is null");
Assert.AreEqual(priorityAccount, account1,
More information about the galago-commits
mailing list