using stdio in tests does not work on windows, and it is not completely reliable on linux.
Avoid using stdio in this test, as it is not necessary for this purpose.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
packages/Python/lldbsuite/test/lang/cpp/virtual/TestVirtual.py | ||
---|---|---|
64 ↗ | (On Diff #58227) | Are we relying on std::string data formatters working here? Seems like a dangerous change as we would require any new ports of LLDB to have std::string formatters working or this test will fail? |
packages/Python/lldbsuite/test/lang/cpp/virtual/TestVirtual.py | ||
---|---|---|
64 ↗ | (On Diff #58227) | That did not occur to me. Would shoving the data into a char * be acceptable? |
Comment Actions
I would just make a large buffer and use snprintf:
char buffer[4096]; char *p = buffer; char *end = p + sizeof(buffer); p += snprintf(p, end - p, "a_as_A->a() = '%s'\n", a_as_A->a()); p += snprintf(p, end - p, "a_as_A->b() = '%s'\n", a_as_A->b());