gradle / gradle-native

The home of Gradle's support for natively compiled languages
https://blog.gradle.org/introducing-the-new-cpp-plugins
Apache License 2.0
92 stars 8 forks source link

C++ unit test base name convention should depend on the tested component if available #973

Open lacasseio opened 5 years ago

lacasseio commented 5 years ago

Expected Behavior

Given a project directory of xyz and the following build script:

plugins {
  id "cpp-library"
  id "cpp-unit-test"
}

library {
  baseName = "greeter"
}

The expected test suite name should be greeterTest. Alternatively, if the cpp-library plugin wasn't applied, the test suite name should be xyzTest.

Current Behavior

The test suite name always defaults to xyzTest. Changes to the tested component library aren't mirror to the test suite as you would be expecting given both components gets linked together.

Context

Steps to Reproduce (for bugs)

Your Environment

lacasseio commented 5 years ago

The XCTest plugin is also affected by this unexpected behaviour.