commit a93fb9a08f6cead6b4c23e9358a72cb0194dc7f7
parent 5552792081ab85dcd3d2d2f0d25b6bd591a15381
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date: Tue, 16 Jul 2024 15:02:40 +0200
Improve a test
Improvements from the new test bad_grouping3
Diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/test_senc3d_bad_grouping2.c b/src/test_senc3d_bad_grouping2.c
@@ -187,10 +187,9 @@ main(int argc, char** argv)
OK(senc3d_enclosure_get_header(enclosure, &header));
OK(senc3d_enclosure_ref_put(enclosure));
for(i = 0; i < sizeof(volumes)/sizeof(*volumes); i++) {
- if(volumes[i] == header.volume) {
- found = 1;
- if(volume_used[i]) return 1;
+ if(!volume_used[i] && fabs(volumes[i] - header.volume) < DBL_EPSILON) {
volume_used[i] = 1;
+ found = 1;
break;
}
}