| 16 | # end |
| 17 | |
| 18 | def test_ExtensibleIndex |
| 19 | factory = OpenStudio::IddFileAndFactoryWrapper.new("EnergyPlus".to_IddFileType) |
| 20 | oio = factory.getObject("BuildingSurface:Detailed".to_IddObjectType) |
| 21 | assert((not oio.empty?)) |
| 22 | iddObj = oio.get() |
| 23 | |
| 24 | extInd = OpenStudio::ExtensibleIndex.new(0,1) |
| 25 | ind = iddObj.index(extInd) |
| 26 | assert_equal(12,ind) |
| 27 | |
| 28 | extInd.group = 2 |
| 29 | extInd.field = 2 |
| 30 | ind = iddObj.index(extInd) |
| 31 | assert_equal(19,ind) |
| 32 | |
| 33 | ind = 27 |
| 34 | extInd = iddObj.extensibleIndex(ind) |
| 35 | assert_equal(5,extInd.group) |
| 36 | assert_equal(1,extInd.field) |
| 37 | |
| 38 | end |
| 39 | |
| 40 | end |