rust_gtest_interop 程式庫
rust_gtest_interop 程式庫提供以下功能:
- 使用 Rust 函式做為
gtest測試案例 (使用#[gtest(...)]屬性) - 使用
expect_eq!和類似的巨集 (類似於assert_eq!,但不會導致恐慌,斷言失敗時也不會終止測試)。
Example:
use rust_gtest_interop::prelude::*;
#[gtest(MyRustTestSuite, MyAdditionTest)]
fn test_addition() {
expect_eq!(2 + 2, 4);
}