0

在 Visual Studio 2017 中使用Catch2 测试适配器时,我的一些包含长场景名称的测试出现错误。我不知道确切的长度阈值,但它似乎发生在场景的字符串长度约为 80 个字符或更多时。有没有办法解决这个问题,而不是只使用较短的场景值?

示例场景,

SCENARIO("I want to be the very best, Like no one ever was. To catch them is my real test, To train them is my cause!")
{
    ...
}

Visual Studio 首次加载并扫描测试时的示例错误,

Error: Unable to reconstruct long test name
  Source: C:\foo\bar\baz\Debug\CatchTests.exe
  Name: Scenario: I want to be the very best, Like no one ever was.{???} To catch them is my real test, To train them is my cause!
  File: C:\foo\bar\baz\src\myTest.cpp
  Line: 123
4

0 回答 0