# CR: IronRuby tests for IDMOP, and ir\_wrap.cmd

**URL:** <https://www.ruby-forum.com/t/cr-ironruby-tests-for-idmop-and-ir-wrap-cmd/164008>\
**Category:** IronRuby\
**Created:** [March 26, 2009, 9:11pm UTC](https://www.ruby-forum.com/t/cr-ironruby-tests-for-idmop-and-ir-wrap-cmd/164008 "2009-03-26T21:11:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shri\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/898d66/32.png) [@Shri\_B](https://www.ruby-forum.com/u/Shri_B)\
**Post date:** [March 26, 2009, 9:11pm UTC](https://www.ruby-forum.com/t/cr-ironruby-tests-for-idmop-and-ir-wrap-cmd/164008/1 "2009-03-26T21:11:08Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Shri\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/898d66/32.png) [@Shri\_B](https://www.ruby-forum.com/u/Shri_B)\
**Post date:** [March 26, 2009, 10:47pm UTC](https://www.ruby-forum.com/t/cr-ironruby-tests-for-idmop-and-ir-wrap-cmd/164008/2 "2009-03-26T22:47:21Z")

</div>

DLR interop tests look good.

Tomas

---

<div class="post-metadata">

**Author:** ![Shri\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/898d66/32.png) [@Shri\_B](https://www.ruby-forum.com/u/Shri_B)\
**Post date:** [March 26, 2009, 11:09pm UTC](https://www.ruby-forum.com/t/cr-ironruby-tests-for-idmop-and-ir-wrap-cmd/164008/3 "2009-03-26T23:09:38Z")

</div>

- 

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

---

<div class="post-metadata">

**Author:** ![Shri\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/898d66/32.png) [@Shri\_B](https://www.ruby-forum.com/u/Shri_B)\
**Post date:** [March 27, 2009, 12:24am UTC](https://www.ruby-forum.com/t/cr-ironruby-tests-for-idmop-and-ir-wrap-cmd/164008/4 "2009-03-27T00:24:37Z")

</div>

Sounds good.

JD

---

<div class="post-metadata">

**Author:** ![Shri\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/898d66/32.png) [@Shri\_B](https://www.ruby-forum.com/u/Shri_B)\
**Post date:** [March 26, 2009, 11:26pm UTC](https://www.ruby-forum.com/t/cr-ironruby-tests-for-idmop-and-ir-wrap-cmd/164008/5 "2009-03-26T23:26:37Z")

</div>

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
