Skip to content

Commit 83c7dfc

Browse files
committed
Tests
1 parent 16fb9a0 commit 83c7dfc

2 files changed

Lines changed: 13 additions & 4 deletions

File tree

tests/functional/WebIfcApi.spec.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ let expressId: number = 9989; // an IFCSPACE
1919
let geometries: Vector < FlatMesh > ; // to store geometries instead of refetching them
2020
let allGeometriesSize: number = 119;
2121
let meshesCount: number = 115;
22-
let totalLineNumber : number = 6488;
22+
let totalLineNumber : number = 6489;
2323
let emptyFileModelID: number;
24-
let lastExpressId : number = 14313;
24+
let lastExpressId : number = 14314;
2525
let expectedFileDescription : string = "ViewDefinition [CoordinationView_V2.0]";
2626
let expectedFileSchema = "IFC2X3";
2727
let expectedFileName = "3458";
@@ -125,7 +125,7 @@ describe('WebIfcApi reading methods', () => {
125125
expect(ifcApi.GetNextExpressID(modelID, 9)).toBe(11);
126126
})
127127
test('returns next expressID if it is the max ID', () => {
128-
expect(ifcApi.GetNextExpressID(modelID, 14312)).toBe(14313);
128+
expect(ifcApi.GetNextExpressID(modelID, 14313)).toBe(14314);
129129
})
130130
test('Can get max expressID', () => {
131131
const maxExpressId : number = ifcApi.GetMaxExpressID(modelID);
@@ -170,6 +170,14 @@ describe('WebIfcApi reading methods', () => {
170170
expect(ifcApi.IsIfcElement(-1)).toBeFalsy();
171171
expect(ifcApi.IsIfcElement(-5)).toBeFalsy();
172172
});
173+
test('Check IFCInteger(0)', () => {
174+
var line = ifcApi.GetLine(modelID,14314);
175+
let foundNull = false;
176+
for (let l of line.ListValues) {
177+
if (l == null) foundNull = true;
178+
}
179+
expect (foundNull == false);
180+
});
173181
});
174182

175183
describe('WebIfcApi geometries', () => {
@@ -545,7 +553,7 @@ describe('function based opening', () => {
545553
}
546554
let modelId = ifcApi.OpenModelFromCallback(retriever);
547555
fs.closeSync(file);
548-
expect(ifcApi.GetAllLines(modelId).size()).toBe(6488);
556+
expect(ifcApi.GetAllLines(modelId).size()).toBe(6489);
549557
});
550558
});
551559

tests/ifcfiles/public/example.ifc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6513,6 +6513,7 @@ DATA;
65136513
#14310= IFCPRESENTATIONLAYERASSIGNMENT('S-COLS-____-OTLN',$,(#192,#223,#307,#316,#377,#386,#447,#456,#517,#526,#598,#607,#675,#684,#747,#756,#830,#839,#990,#999,#1075,#1084,#1162,#1171,#2689,#2707,#3042,#3413,#3422,#3476,#3584,#3593,#3762,#3800,#3954,#3992,#4146,#4300,#4685,#4693,#4745,#4782,#4819,#4856,#4893,#5713,#5721,#5773,#5810,#5847,#5884,#6014,#6022,#6072,#6110,#6148,#6439,#13419,#13427,#13572,#13580,#13725,#13733),$);
65146514
#14312= IFCPRESENTATIONLAYERASSIGNMENT('S-FNDN-____-OTLN',$,(#913,#2234,#2298,#2409,#2476,#9414,#9628,#9700,#13811),$);
65156515
#14313= IFCPOSTALADDRESS($,$,$,$,(''),$,'',$,'','Unknown');
6516+
#14314=IFCPROPERTYLISTVALUE('ListValue IfcInteger multi',$,(IFCINTEGER(-200),IFCINTEGER(-100),IFCINTEGER(0),IFCINTEGER(100),IFCINTEGER(200)),$);
65166517
ENDSEC;
65176518

65186519
END-ISO-10303-21;

0 commit comments

Comments
 (0)