Files
firefox/dom/media/gtest/TestRust.cpp
T
Nicholas Nethercote a0ae5076ac Bug 1315561 - gtestify dom/media/compiledtest/*.cpp. r=padenot.
The only complication was that I had to add namespaces to TestAudioMixer.cpp
and TestAudioSegment.cpp to avoid multiple definitions of a few small helper
functions like GetLowValue().
2016-11-09 08:47:23 +11:00

10 lines
210 B
C++

#include <stdint.h>
#include "gtest/gtest.h"
extern "C" uint8_t* test_rust();
TEST(rust, CallFromCpp) {
auto greeting = test_rust();
EXPECT_STREQ(reinterpret_cast<char*>(greeting), "hello from rust.");
}