Skip to content

Possibility of migrating to CMake and GoogleTest #4

@wdhongtw

Description

@wdhongtw

As Virgil already addressed in README, it's good to use GoogleTest and CMake.

I have a working example here https://github.com/wdhongtw/JSLikePromise/tree/feat-gtest .
One commit for migrate the testing framework to GoogleTest, and another for using CMake to do build automation / generation.

There are still some parts that not look good.

  • The test case/suite need to be prefix by All/Any/Valued..., since that the macro for GoogleTest seems to not support same name in different C++ namespace.
  • Trying to keep indentations and minimize the line of changes, but anonymous namespaces are introduced in test files.
  • The main target, the header-only library itself is not represented as a project in generated VS solution file.
  • GoogleTest is included by CMake FetchContent, so there is two 3rd target gtest and gtest_main in the generated solution file.

If this looks appealing, maybe I can submit PR and/or discuss how can we enhance this. :D

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions