utest.h
utest.h copied to clipboard
Support tests on C++ std::string (attempt 2)
This is helpful for C++ projects.
All these warnings appear when including some STL library, it seems, and they vary by compiler version. I disabled the minimal set, I think.
I measure this with/without this change:
neil@MacBook-Air-2 build % hyperfine --warmup 10 "clang++ -I.. ../test/test.cpp -c"
Benchmark 1: clang++ -I.. ../test/test.cpp -c
Time (mean ± σ): 94.5 ms ± 0.3 ms [User: 79.5 ms, System: 9.2 ms]
Range (min … max): 93.7 ms … 95.2 ms 31 runs
neil@MacBook-Air-2 build % hyperfine --warmup 10 "clang++ -I.. ../test/test.cpp -c"
Benchmark 1: clang++ -I.. ../test/test.cpp -c
Time (mean ± σ): 217.2 ms ± 0.4 ms [User: 197.0 ms, System: 14.3 ms]
Range (min … max): 216.5 ms … 217.8 ms 13 runs
The second being with this change and adding the expensive <string> include. I don't want all my users to pay 2x the cost of including this header to make C++ string things only slightly nicer, so I'm not gonna accept this PR. Thanks for the interest in the project though!