[Ironruby-core] CR: IronRuby tests for IDMOP, and ir_wrap.cmd

Shri Borde Shri.Borde at microsoft.com
Thu Mar 26 17:59:32 EDT 2009


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


-----Original Message-----
From: Jim Deville 
Sent: Thursday, March 26, 2009 2:43 PM
To: Tomas Matousek; Shri Borde; IronRuby External Code Reviewers
Cc: ironruby-core at rubyforge.org
Subject: RE: CR: IronRuby tests for IDMOP, and ir_wrap.cmd

+        [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

> -----Original Message-----
> From: Tomas Matousek
> Sent: Thursday, March 26, 2009 2:23 PM
> To: Shri Borde; IronRuby External Code Reviewers
> Cc: ironruby-core at rubyforge.org
> Subject: RE: CR: IronRuby tests for IDMOP, and ir_wrap.cmd
> 
> DLR interop tests look good.
> 
> Tomas
> 
> -----Original Message-----
> From: Shri Borde
> Sent: Thursday, March 26, 2009 1:03 PM
> To: IronRuby External Code Reviewers
> Cc: ironruby-core at rubyforge.org
> Subject: CR: IronRuby tests for IDMOP, and ir_wrap.cmd
> 
>   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.
> 



More information about the Ironruby-core mailing list