tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

TestRust.cpp (326B)


      1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* vim: set ts=2 et sw=2 tw=80: */
      3 #include <stdint.h>
      4 
      5 #include "gtest/gtest.h"
      6 
      7 extern "C" uint8_t* test_rust();
      8 
      9 TEST(rust, CallFromCpp)
     10 {
     11  auto greeting = test_rust();
     12  EXPECT_STREQ(reinterpret_cast<char*>(greeting), "hello from rust.");
     13 }