blob: ac3843a0053ad37c29381e75891603ec5b93e009 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
--- a/src/test/java/com/kenai/jffi/NumberTest.java
+++ b/src/test/java/com/kenai/jffi/NumberTest.java
@@ -234,9 +234,8 @@
private void returnF32(InvokerType type) {
LibNumberTest lib = UnitHelper.loadTestLibrary(LibNumberTest.class, type);
float[] values = { 0f, 1.0f, -2.0f };
- for (int i = 0; i < values.length; ++i) {
- assertEquals("Value not returned correctly", values[i], lib.ret_float(values[i]), 0.1f);
- }
+ float[] lib_values = { lib.ret_float(0f), lib.ret_float(1.0f), lib.ret_float(-2.0f) };
+ assertArrayEquals("Value not returned correctly", values, lib_values, 0.1f);
}
@Test public void returnDefaultF64() {
|