diff options
| author | Martin Hořeňovský | 2017-10-09 12:31:22 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2017-10-09 13:03:29 +0200 |
| commit | 79b405fd3f752bd61a077d03798001c4e9d711b1 (patch) | |
| tree | c5a2dfbb8d70ce716d7922552c3348b4973d26e2 /scripts | |
| parent | f9727327370abbee50f99d3fcd26f0b114a21887 (diff) | |
| download | catch3-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-x | scripts/approvalTests.py | 6 |
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 |