Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make unit test slightly more complex.

  • Loading branch information...
commit 7e65c7c3a5b0fe9ca519df44e7c58369cc625508 1 parent 552190d
@rbultje authored
Showing with 12 additions and 1 deletion.
  1. +12 −1 unit.c
View
13 unit.c
@@ -17,12 +17,23 @@ static AVRational call_function_2(AVRational x)
(AVRational) { 0, 0 };
}
+static int call_function_3(AVRational x)
+{
+ return x.num ^ x.den;
+}
+
static int call_function(AVRational x)
{
AVRational y = x.num > 0 ? call_function_2((AVRational) { x.num, x.den }) :
x.den > 0 ? call_function_2((AVRational) { x.den, x.num }) :
call_function_2((AVRational) { 0, 0 });
- return call_function_2(x).den;
+ int res;
+
+ if ((res = call_function_3((AVRational) { 5, -5 }) > 0)) {
+ return call_function_2(x).den;
+ } else {
+ return res;
+ }
}
#define lut_vals(x) x, x+1, x+2, x+3
Please sign in to comment.
Something went wrong with that request. Please try again.