Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorMartin Hořeňovský2017-10-09 12:31:22 +0200
committerMartin Hořeňovský2017-10-09 13:03:29 +0200
commit79b405fd3f752bd61a077d03798001c4e9d711b1 (patch)
treec5a2dfbb8d70ce716d7922552c3348b4973d26e2 /scripts
parentf9727327370abbee50f99d3fcd26f0b114a21887 (diff)
downloadcatch3-79b405fd3f752bd61a077d03798001c4e9d711b1.tar.gz
Add stringification for std::chrono::{duration,time_point}
Also hides std::chrono, std::pair and std::chrono::* behind new configuration macros, CATCH_CONFIG_ENABLE_*_STRINGMAKER to avoid dragging in <utility>, <tuple> and <chrono> in common path, unless requested.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/approvalTests.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/approvalTests.py b/scripts/approvalTests.py
index 5c0c63ec..a963531b 100755
--- a/scripts/approvalTests.py
+++ b/scripts/approvalTests.py
@@ -24,7 +24,7 @@ filelocParser = re.compile(r'''
lineNumberParser = re.compile(r' line="[0-9]*"')
hexParser = re.compile(r'\b(0[xX][0-9a-fA-F]+)\b')
durationsParser = re.compile(r' time="[0-9]*\.[0-9]*"')
-timestampsParser = re.compile(r' timestamp="\d{4}-\d{2}-\d{2}T\d{2}\:\d{2}\:\d{2}Z"')
+timestampsParser = re.compile(r'\d{4}-\d{2}-\d{2}T\d{2}\:\d{2}\:\d{2}Z')
versionParser = re.compile(r'Catch v[0-9]+\.[0-9]+\.[0-9]+(-develop\.[0-9]+)?')
nullParser = re.compile(r'\b(__null|nullptr)\b')
exeNameParser = re.compile(r'''
@@ -44,6 +44,7 @@ errnoParser = re.compile(r'''
|
\(\*_errno\(\)\)
''', re.VERBOSE)
+sinceEpochParser = re.compile(r'\d+ .+ since epoch')
if len(sys.argv) == 2:
cmdPath = sys.argv[1]
@@ -97,9 +98,10 @@ def filterLine(line):
# strip durations and timestamps
line = durationsParser.sub(' time="{duration}"', line)
- line = timestampsParser.sub(' timestamp="{iso8601-timestamp}"', line)
+ line = timestampsParser.sub('{iso8601-timestamp}', line)
line = specialCaseParser.sub('file:\g<1>', line)
line = errnoParser.sub('errno', line)
+ line = sinceEpochParser.sub('{since-epoch-report}', line)
return line