[theminds commit] r124 - in trunk/Theminds: . Filters Tests

0 views
Skip to first unread message

codesite...@google.com

unread,
May 12, 2007, 6:12:11 PM5/12/07
to theminds...@googlegroups.com
Author: shadytrees
Date: Sat May 12 15:11:55 2007
New Revision: 124

Modified:
trunk/Theminds/AppStart.cs
trunk/Theminds/Buffer interfaces.cs
trunk/Theminds/Filters/WhoFilter.cs
trunk/Theminds/Tests/JoinPartQuitFilter.cs
trunk/Theminds/Tests/MockApp.cs

Log:
now using `is` instead of typeof&GetType; Invoke -> BeginInvoke in WhoFilter; implementing MockApp#BeginInvoke // part, self, a reason

Modified: trunk/Theminds/AppStart.cs
==============================================================================
--- trunk/Theminds/AppStart.cs (original)
+++ trunk/Theminds/AppStart.cs Sat May 12 15:11:55 2007
@@ -1,4 +1,4 @@
-//#define ENABLE_TEST
+#define ENABLE_TEST

using System.Diagnostics;
using System.Windows.Forms;

Modified: trunk/Theminds/Buffer interfaces.cs
==============================================================================
--- trunk/Theminds/Buffer interfaces.cs (original)
+++ trunk/Theminds/Buffer interfaces.cs Sat May 12 15:11:55 2007
@@ -20,7 +20,7 @@

public override bool Equals(object obj) {
if (obj == null) return false;
- if (typeof(TabKey) != obj.GetType()) return false;
+ if (!(obj is TabKey)) return false;
TabKey o = (TabKey)obj;
return (o.Connection == this.Connection) &&
(o.Channel == this.Channel);

Modified: trunk/Theminds/Filters/WhoFilter.cs
==============================================================================
--- trunk/Theminds/Filters/WhoFilter.cs (original)
+++ trunk/Theminds/Filters/WhoFilter.cs Sat May 12 15:11:55 2007
@@ -36,7 +36,7 @@
data.Color = Color.DarkBlue;
data.Ignore = true;
if (data.Line.Contains("End of /WHO"))
- app.Invoke(new MethodInvoker(stop));
+ app.BeginInvoke(new MethodInvoker(stop));
else
app.UserList.Push(tokens[5]);
}

Modified: trunk/Theminds/Tests/JoinPartQuitFilter.cs
==============================================================================
--- trunk/Theminds/Tests/JoinPartQuitFilter.cs (original)
+++ trunk/Theminds/Tests/JoinPartQuitFilter.cs Sat May 12 15:11:55 2007
@@ -31,15 +31,6 @@
// join, self
test(":Tongue!ip JOIN :#spreadbutter",
S.Format(joinSelf, channel), "tips");
- // part, self, no reason
- test(":Tongue!ip PART #spreadbutter",
- S.Format(partSelf, "#spreadbutter"), "soulz");
- // part, self, a reason
- test(":Tongue!ip PART #spreadbutter :Too verklempt",
- S.Format(partTotal,
- S.Format(partSelf, "#spreadbutter"),
- S.Format(partReason, "Too verklempt")),
- "verklempt");
// part, others, no reason
test(":Tongues!ip PART #spreadbutter",
S.Format(partOthers, "Tongues", "ip", channel),
@@ -52,6 +43,15 @@

// And now those that do not need no stinking channel.
this.channel = null;
+ // part, self, no reason
+ test(":Tongue!ip PART #spreadbutter",
+ S.Format(partSelf, "#spreadbutter"), "soulz");
+ // part, self, a reason
+ test(":Tongue!ip PART #spreadbutter :Too verklempt",
+ S.Format(partTotal,
+ S.Format(partSelf, "#spreadbutter"),
+ S.Format(partReason, "Too verklempt")),
+ "verklempt");
// quit, others, a reason
test(":t!ip QUIT :Goodbye cruelle world",
S.Format(quitTotal, S.Format(quitOthers, "t", "ip"),

Modified: trunk/Theminds/Tests/MockApp.cs
==============================================================================
--- trunk/Theminds/Tests/MockApp.cs (original)
+++ trunk/Theminds/Tests/MockApp.cs Sat May 12 15:11:55 2007
@@ -46,7 +46,7 @@
}

public IAsyncResult BeginInvoke(Delegate d, params object[] args) {
- throw new Exception("The method or operation is not implemented.");
+ Invoke(d, args); return null;
}

public object Invoke(Delegate d, params object[] args) {

shady...@gmail.com

unread,
May 12, 2007, 6:13:19 PM5/12/07
to theminds-commits
Also, before Windows Command Prompt hated me, Tests/JPQFilter needed
changes because of the whole part&FromMe=>null thing.

Reply all
Reply to author
Forward
0 new messages