aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Rogers <[email protected]>2020-05-12 23:27:51 -0700
committerArnaldo Carvalho de Melo <[email protected]>2020-05-28 10:03:26 -0300
commit63f11355a6ee7febc7b3fdad8a7009c0e16748df (patch)
treeded707362e72859e05e172916ae46dced4b168b5
parentda231338ec9c098707c8a1e4d8a50e2400e2fe17 (diff)
perf expr: Test parsing of floating point numbers
Add test for fix in: commit 5741da3dee4c ("perf expr: Parse numbers as doubles") Signed-off-by: Ian Rogers <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Jin Yao <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: John Garry <[email protected]> Cc: Kajol Jain <[email protected]> Cc: Kan Liang <[email protected]> Cc: Leo Yan <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul Clarke <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lore.kernel.org/lkml/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r--tools/perf/tests/expr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/tests/expr.c b/tools/perf/tests/expr.c
index f9e8e5628836..3f742612776a 100644
--- a/tools/perf/tests/expr.c
+++ b/tools/perf/tests/expr.c
@@ -39,6 +39,7 @@ int test__expr(struct test *t __maybe_unused, int subtest __maybe_unused)
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);
+ ret |= test(&ctx, "1.1 + 2.1", 3.2);
if (ret)
return ret;