#include <catch2/catch_test_macros.hpp>
#include "Provider.hpp"
Go to the source code of this file.
◆ TEST_CASE() [1/3]
| TEST_CASE |
( |
"ofi: Provider enum from API conversion" | , |
|
|
"" | [ofi][Provider] ) |
Definition at line 18 of file test_Provider.cpp.
19{
20 REQUIRE(providerFromAPI(MXL_FABRICS_PROVIDER_TCP) == Provider::TCP);
21 REQUIRE(providerFromAPI(MXL_FABRICS_PROVIDER_VERBS) == Provider::VERBS);
22 REQUIRE(providerFromAPI(MXL_FABRICS_PROVIDER_EFA) == Provider::EFA);
23 REQUIRE(providerFromAPI(MXL_FABRICS_PROVIDER_SHM) == Provider::SHM);
24 REQUIRE_FALSE(providerFromAPI(static_cast<mxlFabricsProvider>(999)).has_value());
25}
Provider
Internal representation of supported libfabric providers.
◆ TEST_CASE() [2/3]
| TEST_CASE |
( |
"ofi: Provider enum to API conversion" | , |
|
|
"" | [ofi][Provider] ) |
Definition at line 10 of file test_Provider.cpp.
11{
12 REQUIRE(providerToAPI(Provider::TCP) == MXL_FABRICS_PROVIDER_TCP);
13 REQUIRE(providerToAPI(Provider::VERBS) == MXL_FABRICS_PROVIDER_VERBS);
14 REQUIRE(providerToAPI(Provider::EFA) == MXL_FABRICS_PROVIDER_EFA);
15 REQUIRE(providerToAPI(Provider::SHM) == MXL_FABRICS_PROVIDER_SHM);
16}
◆ TEST_CASE() [3/3]
| TEST_CASE |
( |
"ofi: Provider from string" | , |
|
|
"" | [ofi][Provider] ) |
Definition at line 27 of file test_Provider.cpp.
28{
29 REQUIRE(providerFromString("tcp") == Provider::TCP);
30 REQUIRE(providerFromString("verbs") == Provider::VERBS);
31 REQUIRE(providerFromString("efa") == Provider::EFA);
32 REQUIRE(providerFromString("shm") == Provider::SHM);
33
34 REQUIRE_FALSE(providerFromString("invalid").has_value());
35 REQUIRE_FALSE(providerFromString("foo").has_value());
36}