mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-30 14:17:36 -10:00
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().
10 lines
210 B
C++
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.");
|
|
}
|