mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-26 03:35:33 +00:00
c832f2d6d6
This is mostly to verify compilation and linkage. The test itself just verifies the contents of an returned string. --HG-- extra : rebase_source : b35f41d565c6fda85ad010a328cd61b3c37681da
9 lines
185 B
C++
9 lines
185 B
C++
#include <stdint.h>
|
|
|
|
extern "C" uint8_t* test_rust();
|
|
|
|
TEST(rust, CallFromCpp) {
|
|
auto greeting = test_rust();
|
|
EXPECT_STREQ(reinterpret_cast<char*>(greeting), "hello from rust.");
|
|
}
|