如何从 Catch2 测试用例中访问自定义命令行选项?

Spa*_*ler 6 c++ command-line catch2

我使用自定义主文件添加了我自己的命令行选项:

https://github.com/catchorg/Catch2/blob/master/docs/own-main.md#adding-your-own-command-line-options

  // ...
  auto cli 
    = session.cli() // Get Catch's composite command line parser
    | Opt( height, "height" ) // bind variable to a new option, with a hint string
        ["-g"]["--height"]    // the option names it will respond to
        ("how high?");        // description string for the help output

  // ...
}
Run Code Online (Sandbox Code Playgroud)

现在我想height在测试用例中使用命令行选项。什么是最好的方法来做到这一点?