Skip to content
Snippets Groups Projects
Commit 791ea23e authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

avutil/softfloat: Add test for av_gt_sf()

parent ecfb0761
No related branches found
No related tags found
No related merge requests found
...@@ -118,6 +118,10 @@ int main(void){ ...@@ -118,6 +118,10 @@ int main(void){
if (FFDIFFSIGN(i,j) != c && (FFDIFFSIGN(i,j)^c)<0) { if (FFDIFFSIGN(i,j) != c && (FFDIFFSIGN(i,j)^c)<0) {
printf("av_cmp_sf failed at %d %d as %X\n", i, j, c); printf("av_cmp_sf failed at %d %d as %X\n", i, j, c);
} }
c = av_gt_sf(sf1, sf2);
if ((i>j) != c) {
printf("av_gt_sf failed at %d %d as %X\n", i, j, c);
}
} }
sf1 = av_int2sf(1, i); sf1 = av_int2sf(1, i);
for(j = 0; j < 100; j++) { for(j = 0; j < 100; j++) {
...@@ -127,6 +131,10 @@ int main(void){ ...@@ -127,6 +131,10 @@ int main(void){
if (FFDIFFSIGN(i,j) != c && (FFDIFFSIGN(i,j)^c) < 0) { if (FFDIFFSIGN(i,j) != c && (FFDIFFSIGN(i,j)^c) < 0) {
printf("av_cmp_sf failed2 at %d %d as %X\n", i, j, c); printf("av_cmp_sf failed2 at %d %d as %X\n", i, j, c);
} }
c = av_gt_sf(sf1, sf2);
if ((i<j) != c) {
printf("av_gt_sf failed2 at %d %d as %X\n", i, j, c);
}
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment