GoogleTest 通过引用初始化

GoogleTest initialization by reference

什么原因,为什么GoogleTest对参数计数使用引用?

  testing::InitGoogleTest(&argc, argv);

(我的意思是:据我了解,这是一个输入参数,没有区别 是否提供了值或地址)

参见comments

// Initializes Google Test.  This must be called before calling
// RUN_ALL_TESTS().  In particular, it parses a command line for the
// flags that Google Test recognizes.  Whenever a Google Test flag is
// seen, it is removed from argv, and *argc is decremented.