RustTestResultParser
public class RustTestResultParser
extends MultiLineReceiver
java.lang.Object | ||
↳ | com.android.ddmlib.MultiLineReceiver | |
↳ | com.android.tradefed.testtype.rust.RustTestResultParser |
解釋使用 Rust 的單元測試框架運行的測試的輸出,並將其轉換為對一系列ITestInvocationListener
的調用。
從 Rust 測試中尋找以下輸出:
running 10 tests test LexError ... ok <0.001s> test idents ... FAILED <0.000s> test make_sure_no_proc_macro ... ignored test test_scalar_div_rem_zero ... ignored, Android sometimes uses panic_abort ... ---- tests::idents stdout ---- thread 'main' panicked at 'assertion failed: `(left == right)` ... test result: ok. 10 passed; 1 failed; 1 ignored; 0 measured; 0 filtered out
@See https://doc.rust-lang.org/book/ch11-00-testing.html
概括
公共構造函數 | |
---|---|
RustTestResultParser ( ITestInvocationListener listener, String runName) 創建一個新的 | |
RustTestResultParser ( listeners, String runName) RustTestResultParser ( listeners, String runName) 創建一個新的 |
公共方法 | |
---|---|
void | done () 將記錄的測試結果發送給所有聽眾。 |
boolean | isCancelled () |
void | processNewLines (String[] lines) 處理 Rust 單元測試輸出。 |
公共構造函數
RustTestResultParser
public RustTestResultParser (ITestInvocationListener listener, String runName)
創建一個新的RustTestResultParser
向給定的ITestInvocationListener
報告。
參數 | |
---|---|
listener | ITestInvocationListener :測試調用偵聽器 |
runName | String :測試名稱 |
RustTestResultParser
public RustTestResultParser (listeners, String runName)
創建一個新的RustTestResultParser
向給定的ITestInvocationListener
報告。
參數 | |
---|---|
listeners | |
runName | String :測試名稱 |
公共方法
完畢
public void done ()
將記錄的測試結果發送給所有聽眾。
取消
public boolean isCancelled ()
退貨 | |
---|---|
boolean |
處理換行
public void processNewLines (String[] lines)
處理 Rust 單元測試輸出。
參數 | |
---|---|
lines | String |