Tpetra::Map: Generalize tests that depend unnecessarily on particular GO types
Created by: mhoemmen
@trilinos/tpetra
Find and generalize all Tpetra::Map tests that depend unnecessarily on particular GlobalOrdinal (GO) types. These tests live in tpetra/core/test/Map.
One example of such a test is Map_removeEmptyProcesses.cpp. There is no reason why this test needs LO=int and GO=long. Its choice of GO=long is particularly bad, since GO=long is not enabled by default (default GO types are currently int and long long, but see #74 (closed)). This means that most developers haven't even been building the test, let alone running it.
See my recent commit cd63103c for an example of what to do. That commit fixes the test in other ways, but the main changes with respect to this task are as follows:
- Make sure everything in the test lives in an anonymous namespace (always a good idea, to avoid namespace collisions)
- Use TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL instead of TEUCHOS_UNIT_TEST, to make the test templated on LO, GO, NT (the Node type; name doesn't matter)
- Add test instantiations at the end, using the pattern in Map_replaceCommWithSubset.cpp (as of the above commit to the develop branch)