[PATCH] D136469: [llvm-lit][test] Fix regex to capture scientific notation
Owen Reynolds via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 24 07:44:52 PDT 2022
gbreynoo added inline comments.
================
Comment at: llvm/utils/lit/tests/test-output-micro.py:42
# CHECK-NEXT: "code": "PASS",
-# CHECK-NEXT: "elapsed": {{[0-9.]+}},
+# CHECK-NEXT: "elapsed": {{[+-]?([[:digit:]]+(.[[:digit:]]*)?|.[[:digit:]]+)([eE][+-]?[[:digit:]]+)?}},
# CHECK-NEXT: "metrics": {
----------------
jdenny wrote:
> If the goal is to be strict, then `.` needs to be escaped to make it literal.
>
> However, is it important to be so strict here? What about something simple like `{{[-+0-9.eE]+}}`?
Thanks @jdenny, that's much better.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136469/new/
https://reviews.llvm.org/D136469
More information about the llvm-commits
mailing list