Skip to content

Commit d146a62

Browse files
committed
update tests to work with STEPattribute class changes
1 parent 067098a commit d146a62

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

test/cpp/schema_specific/aggregate_bound_runtime.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,9 @@ int main( int argc, char * argv[] ) {
8181
}
8282
//loop over the attributes
8383
for( int i = 0; i < cnt; i++ ) {
84-
if( ( sal[i].aDesc->NonRefType() == ARRAY_TYPE ) && ( sal[i].aDesc->AggrElemType() == sdaiINTEGER ) ) {
85-
b2 = ( ( AggrTypeDescriptor * ) sal[i].aDesc->DomainType() )->Bound2Runtime( ent );
84+
const AttrDescriptor * ad = sal[i].getADesc();
85+
if( ( ad->NonRefType() == ARRAY_TYPE ) && ( ad->AggrElemType() == sdaiINTEGER ) ) {
86+
b2 = ( ( AggrTypeDescriptor * ) ad->DomainType() )->Bound2Runtime( ent );
8687
cout << "bound 2: " << b2 << " values: ";
8788
instAggrCnt++;
8889
if( ( ( id == 1 ) && ( b2 != 3 ) ) || ( ( id == 2 ) && ( b2 != 5 ) ) ) {

test/cpp/schema_specific/attribute.cc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
/** \file inverse_attr.cc
2-
** 1-Jul-2012
3-
** Test inverse attributes; uses a tiny schema similar to a subset of IFC2x3
4-
**
5-
*/
1+
/** \file attribute.cc
2+
* 1-Jul-2012
3+
* Test attribute access; uses a tiny schema similar to a subset of IFC2x3
4+
*/
65
#include <sc_cf.h>
76
extern void SchemaInit( class Registry & );
87
#include "sc_version_string.h"

test/cpp/schema_specific/inverse_attr2.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ bool findInverseAttrs2( InverseAItr iai, InstMgr & instList, Registry & reg ) {
5353
return false;
5454
}
5555
STEPattribute sa = attrlist[k];
56-
if( sa.aDesc->DomainType()->Type() == SET_TYPE ) {
57-
STEPaggregate * aggr = sa.ptr.a;
56+
if( sa.getADesc()->DomainType()->Type() == SET_TYPE ) {
57+
STEPaggregate * aggr = sa.Aggregate();
5858
if( !aggr || aggr->is_null() != 0 ) { //this fails - and it appears that aggr is not initialized.
5959
cout << "findInverseAttrs2 FAILED" << endl;
6060
return false;

0 commit comments

Comments
 (0)