summaryrefslogtreecommitdiffstats
path: root/tools/perf/tests/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/tests/expr.c')
-rw-r--r--tools/perf/tests/expr.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/perf/tests/expr.c b/tools/perf/tests/expr.c
index 6c6a374..cb251bf 100644
--- a/tools/perf/tests/expr.c
+++ b/tools/perf/tests/expr.c
@@ -13,7 +13,7 @@ static int test(struct parse_ctx *ctx, const char *e, double val2)
return 0;
}
-int test__expr(int subtest __maybe_unused)
+int test__expr(struct test *t __maybe_unused, int subtest __maybe_unused)
{
const char *p;
const char **other;
@@ -31,6 +31,11 @@ int test__expr(int subtest __maybe_unused)
ret |= test(&ctx, "(BAR/2)%2", 1);
ret |= test(&ctx, "1 - -4", 5);
ret |= test(&ctx, "(FOO-1)*2 + (BAR/2)%2 - -4", 5);
+ ret |= test(&ctx, "1-1 | 1", 1);
+ ret |= test(&ctx, "1-1 & 1", 0);
+ ret |= test(&ctx, "min(1,2) + 1", 2);
+ ret |= test(&ctx, "max(1,2) + 1", 3);
+ ret |= test(&ctx, "1+1 if 3*4 else 0", 2);
if (ret)
return ret;
OpenPOWER on IntegriCloud