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( listeners, String runName)

建立新的 RustTestResultParser,向指定的 ITestInvocationListener 回報。

公用方法

void done()

將錄製的測試結果傳送給所有監聽器。

boolean isCancelled()
void processNewLines(String[] lines)

Process Rust unittest output.

公用建構函式

RustTestResultParser

public RustTestResultParser ( listeners, 
                String runName)

建立新的 RustTestResultParser,向指定的 ITestInvocationListener 回報。

參數
listeners :測試叫用監聽器

runName String:測試名稱

公用方法

done

public void done ()

將記錄的測試結果傳送給所有監聽器。

isCancelled

public boolean isCancelled ()

傳回
boolean

processNewLines

public void processNewLines (String[] lines)

處理 Rust 單元測試輸出內容。

參數
lines String:包含新行的陣列。