为什么谷歌测试不打印堆栈跟踪或文件名
Why does Google Test not print a stack trace or file name?
当我使用Google Test和Google Mock时,诊断级别设置为"info",我收到如下消息:
Uninteresting mock function call - taking default action specified at:
src/pkgtest/test_Foo.cpp:216:
Function call: GetBar()
Returns: 4-byte object <00-00 00-00>
Stack trace:
Uninteresting mock function call - taking default action specified at:
src/pkgtest/test_Foo.cpp:126:
Function call: GetBaz()
Returns: {}
Stack trace:
unknown file: Failure
C++ exception with description "Uninteresting mock function call - returning default value.
Function call: CreateGrille(@0x7fff6a557050 { 16-byte object <80-D8 BB-01 00-00 00-00 70-D8 BB-01 00-00 00-00> })
The mock function has no default action set, and its return type has no default value set." thrown in the test body.
我在互联网上找不到任何关于为什么 Google Test/Mock 不会打印堆栈跟踪或声称"未知文件"的任何信息。我需要做什么来教它如何正确转储堆栈跟踪?
(我在使用 g++ 4.9 的 Linux 上,如果这有什么不同的话。
根据Samuel Benzaquen的说法:
gTest 不包括堆栈开卷机。你必须提供你自己的。 您可以在 include/gtest/internal/custom/gtest.h 中通过定义 指向实现的GTEST_OS_STACK_TRACE_GETTER_宏 OsStackTraceGetterInterface.
https://groups.google.com/d/msg/googletestframework/WMJuxAE7y-A/3FjexkRpEQAJ
相关文章:
- 从命令行c++发送文本文件名
- 如何在OMNET++中指定与命令行参数组合的输出文件名
- 为什么文件名被设置为一个点,而不是在读取矢量中的文件名时
- 光线跟踪器灯光反射错误
- 人脸跟踪arduino代码的优化
- 跟踪滚动条上的鼠标事件
- 当Microsoft文档仅包含 C# 示例时,如何查找 C++ 包含文件名
- 如何使用新运算符跟踪在循环中创建的 QLabel
- 如何在CPP的给定目录中列出UTF编码的文件名?
- C++:跟踪类对象
- 用于解析 win64 堆栈跟踪的命令行客户端(可以访问符号服务器)
- 跟踪日志中的T.11803()是什么意思?
- 在Visual Studio 2019中保存时ReadDirectoryChangesW文件名的问题
- C++:在Windows中浏览名称中带有点的文件名
- 我在 ifstream input_file(文件名)行中收到错误"no matching function to call";
- 不带预处理器的调用方法/文件的文件名/行号
- 在 C++ 中为文件名添加时间戳
- 是否有一种便携式/标准的方法可以在堆栈跟踪中获取文件名和亚麻布
- 为什么谷歌测试不打印堆栈跟踪或文件名
- 跟踪文件名更改