RustTestResultParser
public
class
RustTestResultParser
extends MultiLineReceiver
| java.lang.Object | ||
| ↳ | com.android.ddmlib.MultiLineReceiver | |
| ↳ | com.android.tradefed.testtype.rust.RustTestResultParser | |
解讀使用 Rust 的 unittest 架構執行的測試輸出內容,並將其轉譯為一系列 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
@請參閱 https://doc.rust-lang.org/book/ch11-00-testing.html
摘要
公用建構函式 | |
|---|---|
RustTestResultParser(
建立新的 |
|
公用方法 | |
|---|---|
void
|
done()
將錄製的測試結果傳送給所有聽眾。 |
boolean
|
isCancelled()
|
void
|
processNewLines(String[] lines)
處理 Rust 單元測試輸出內容。 |
公用建構函式
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 |