简体   繁体   English

Minidump单元测试未返回true

[英]Minidump unit test doesn't return true

I have been trying to run this unittest from Google breakpad for minidumps. 我一直在试图运行这个单元测试 ,从谷歌breakpad的小型转储。 Now on line 165, it compares the dump written to /temp/ with expected values that are hardcoded. 现在在第165行,它将写入/ temp /的转储与硬编码的期望值进行比较。 Here, instead of returning true, the ASSERT statement fails. 此处, ASSERT语句失败,而不是返回true。

ASSERT_EQ(memcmp(buffer, expected, expected_byte_count), 0);

Why is this happening? 为什么会这样呢?

Why is this happening? 为什么会这样呢?

The ASSERT_EQ fails because memcmp(buffer, expected, expected_byte_count) indicates a difference in the contents from buffer and expected . ASSERT_EQ失败,因为memcmp(buffer, expected, expected_byte_count) ASSERT_EQ memcmp(buffer, expected, expected_byte_count)表示与bufferexpected内容不同。

Did you note there is an #if defined(__BIG_ENDIAN__) used to select the expected values? 您是否注意到有一个#if defined(__BIG_ENDIAN__)用于选择期望值? Did you try un-/providing it alternately? 您是否尝试过取消/交替提供?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM