Forum: IronRuby CR: IronRuby tests for IDMOP, and ir_wrap.cmd

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Shri B. (Guest)
on 2009-03-26 22:11
(Received via mailing list)
Attachment: iridmop.diff (0 Bytes)
tfpt review "/shelveset:iridmop;REDMOND\sborde"

  Comment  :
  Adding unit tests for Ruby's IDynamicMetaObjectProvider support.
Failing scenarios are tagged with AreEqualBug and
AssertExceptionThrownBug
  Added Languages\Ruby\Scripts\ir_wrap.cmd as the replacement for
Test\Scripts\ir.cmd which does not exist in GIT. Most of the files are
changed because of this.
Tomas M. (Guest)
on 2009-03-26 23:47
(Received via mailing list)
DLR interop tests look good.

Tomas
Jim D. (Guest)
on 2009-03-27 00:09
(Received via mailing list)
+        [DebuggerHiddenAttribute]
+        internal void AreEqualBug(object x, object y, object
buggyResult) {
+            AreEqual(x, buggyResult);
+        }
+
+        [DebuggerHiddenAttribute]
+        internal void AreEqualBug<T>(Action f, object y) where T :
Exception {
+            AssertExceptionThrown<T>(f);
+        }
+
+        [DebuggerHiddenAttribute]
+        internal void AssertExceptionThrownBug<T>(Action f) where T :
Exception {
+            f();
+        }
At the risk of asking a dumb question: Is it expected that y doesn't get
used in these? I'm guessing yes, but I want to a) make sure, b) suggest
a comment so that future users don't think something is missing. Also,
the Exception doesn't get checked in AssertExceptionThrownBug. Am I
missing something?

In ir_wrap.cmd, we shouldn't unconditionally set HOME. We may overwrite
a custom setting, and we can probably expect that this script will be
called from a Dev.bat cmd prompt, so HOME should already be set.

Other than that, looks good.

JD
Shri B. (Guest)
on 2009-03-27 00:26
(Received via mailing list)
I will add comments. The code should be as shown. The reason y exists
for now is to document the expected result. However, because the IDMOP
support isn't baked, IronRuby produces "buggyResult" today. Say 1+2 give
300 today. In that case, I have added "AreEqual(1+2, 3, 300) to document
what the result should be once the bug is fixed, and what the result is
today.

I did wonder about HOME being set. However, I just copied the old
ir.cmd. I don't want to change this for now to reduce the chance of
breaking something inadvertently. Once the change is in, I can look into
cleaning it up as a separate change.

Thanks,
Shri
Jim D. (Guest)
on 2009-03-27 01:24
(Received via mailing list)
Sounds good.

JD
This topic is locked and can not be replied to.