Remove Rust files from media gtests

This commit is contained in:
trav90 2018-12-08 15:43:58 -06:00 committed by Roy Tam
commit ef2f6d6f28
4 changed files with 0 additions and 164 deletions

View file

@ -1,7 +0,0 @@
[package]
name = "mp4parse-gtest"
version = "0.1.0"
authors = ["nobody@mozilla.org"]
[lib]
path = "hello.rs"

View file

@ -1,9 +0,0 @@
#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.");
}

View file

@ -1,6 +0,0 @@
#[no_mangle]
pub extern fn test_rust() -> *const u8 {
// NB: rust &str aren't null terminated.
let greeting = "hello from rust.\0";
greeting.as_ptr()
}