gecko-dev/dom/media/gtest/TestRust.cpp
Ralph Giles c832f2d6d6 Bug 1161339 - Add gtest calling rust code. r=cajbir
This is mostly to verify compilation and linkage.
The test itself just verifies the contents of an
returned string.

--HG--
extra : rebase_source : b35f41d565c6fda85ad010a328cd61b3c37681da
2015-05-07 12:15:00 -07:00

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.");
}