ObjFW  Check-in [316dca7bcd]

Overview
Comment:tests: Make Apple GCC 4.0.1 happy
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 316dca7bcde213b7f38d30ada9443ac87a98c39caeec47e407c61acd281e60d6
User & Date: js on 2023-04-02 10:49:42
Other Links: manifest | tags
Context
2023-04-10
14:33
Fall back to uselocale() if it's available check-in: 6e786896e0 user: js tags: trunk
2023-04-02
10:49
tests: Make Apple GCC 4.0.1 happy check-in: 316dca7bcd user: js tags: trunk
2023-03-26
14:28
README.md: Fix iOS instructions check-in: 24a132495e user: js tags: trunk
Changes

Modified tests/OFMatrix4x4Tests.m from [ceb4a0e078] to [26a9451c0a].

84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
	    R(matrix2 = [OFMatrix4x4 identityMatrix]) &&
	    R([matrix2 translateWithVector: OFMakeVector3D(1, 2, 3)]) &&
	    R(point =
	    [matrix2 transformedVector: OFMakeVector4D(2, 3, 4, 1)]) &&
	    point.x == 3 && point.y == 5 && point.z == 7 && point.w == 1)

	TEST(@"-[scaleWithVector:]",
	    R([matrix2 scaleWithVector: OFMakeVector3D(-1, 0.5, 2)]) &&
	    R(point =
	    [matrix2 transformedVector: OFMakeVector4D(2, 3, 4, 1)]) &&
	    point.x == -3 && point.y == 2.5 && point.z == 14 && point.w == 1)

	TEST(@"-[transformedVector:]",
	    R((point =
	    [matrix transformedVector: OFMakeVector4D(1, 2, 3, 1)])) &&
	    point.x == 18 && point.y == 46 && point.z == 74 && point.w == 102)

	objc_autoreleasePoolPop(pool);
}
@end







|












84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
	    R(matrix2 = [OFMatrix4x4 identityMatrix]) &&
	    R([matrix2 translateWithVector: OFMakeVector3D(1, 2, 3)]) &&
	    R(point =
	    [matrix2 transformedVector: OFMakeVector4D(2, 3, 4, 1)]) &&
	    point.x == 3 && point.y == 5 && point.z == 7 && point.w == 1)

	TEST(@"-[scaleWithVector:]",
	    R([matrix2 scaleWithVector: OFMakeVector3D(-1, 0.5f, 2)]) &&
	    R(point =
	    [matrix2 transformedVector: OFMakeVector4D(2, 3, 4, 1)]) &&
	    point.x == -3 && point.y == 2.5 && point.z == 14 && point.w == 1)

	TEST(@"-[transformedVector:]",
	    R((point =
	    [matrix transformedVector: OFMakeVector4D(1, 2, 3, 1)])) &&
	    point.x == 18 && point.y == 46 && point.z == 74 && point.w == 102)

	objc_autoreleasePoolPop(pool);
}
@end