Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A new test case macro that have platform and compiler selection #59

Open
Thecarisma opened this issue Dec 2, 2021 · 0 comments
Open

Comments

@Thecarisma
Copy link
Member

Add a new test case macro that allows selectively execution features, can accept options for the compiler, platform, and architecture.
Should execute test if it matched the + selection and ignore if matches the - selection. Using bitflag for a more seamless selection. Should be optional for compilation.

Proposed format

CESTER_TEST_SELECTIVE(test_name, arg, {
    // test body
    cester_assert_nothing();
}, 
// fourth argument is flags of selected platforms, compilers, and architectures 
CESTER_SELECTIVE_PLATFORM_ALL | CESTER_SELECTIVE_COMPILER_ALL | CESTER_SELECTIVE_ARCH_ALL
,
// fifth argument is flags of platforms, compilers, and architectures to ignore
CESTER_SELECTIVE_RASPBERRY_PI
)

Possible CESTER_SELECTIVE_* bit flags

  • CESTER_SELECTIVE_PLATFORM_ALL
  • CESTER_SELECTIVE_COMPILER_ALL
  • CESTER_SELECTIVE_ARCH_ALL
  • CESTER_SELECTIVE_NONE
  • CESTER_SELECTIVE_PLATFORM_WINDOWS
  • CESTER_SELECTIVE_PLATFORM_LINUX
  • CESTER_SELECTIVE_PLATFORM_MACOS
  • CESTER_SELECTIVE_PLATFORM_UNIX
  • CESTER_SELECTIVE_PLATFORM_RASPBERRY_PI
  • CESTER_SELECTIVE_PLATFORM_ANDRUINO
  • CESTER_SELECTIVE_PLATFORM_HAIKU
  • CESTER_SELECTIVE_COMPILER_CLANG
  • CESTER_SELECTIVE_COMPILER_GCC
  • CESTER_SELECTIVE_COMPILER_TCC
  • CESTER_SELECTIVE_COMPILER_MSVC
  • CESTER_SELECTIVE_ARCH_ARM
  • CESTER_SELECTIVE_ARCH_X86
  • CESTER_SELECTIVE_ARCH_X64
  • CESTER_SELECTIVE_ARCH_X86_64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant