Fixes the test gmock_output_test.py with MSVC

For MSVC, gmock_output_test.py output struct std::pair<int,bool>, for GCC, it's output
std::pair<int, bool>, it's not the same, my intention is getting these to be same by removing
struct  for MSVC's outptu, and strip redundant space for GCC.

As a by-product,
```
#ifdef _MSC_VER
#define ERROR_DESC "class std::runtime_error"
#else
#define ERROR_DESC "std::runtime_error"
#endif
```
can be simplified to

```
#define ERROR_DESC "std::runtime_error"
```

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
This commit is contained in:
Yonggang Luo
2022-11-24 23:54:19 +08:00
parent 097f64e986
commit 6f1c4b3d7b
3 changed files with 31 additions and 5 deletions

View File

@@ -292,7 +292,7 @@ Stack trace:
FILE:#: Failure
Value of: (std::pair<int, bool>(42, true))
Expected: is pair (first: is >= 48, second: true)
Actual: (42, true) (of type std::pair<int, bool>)
Actual: (42, true) (of type std::pair<int,bool>)
[ FAILED ] GMockOutputTest.PrintsMatcher
[ FAILED ] GMockOutputTest.UnexpectedCall
[ FAILED ] GMockOutputTest.UnexpectedCallToVoidFunction