]> git.lizzy.rs Git - rust.git/commitdiff
Add tests for JSON and console output
authorMark Rousskov <mark.simulacrum@gmail.com>
Fri, 11 Mar 2022 12:30:21 +0000 (07:30 -0500)
committerMark Rousskov <mark.simulacrum@gmail.com>
Fri, 11 Mar 2022 12:30:21 +0000 (07:30 -0500)
src/test/run-make-fulldeps/libtest-json/Makefile
src/test/run-make-fulldeps/libtest-json/f.rs
src/test/run-make-fulldeps/libtest-json/output-default.json
src/test/run-make-fulldeps/libtest-json/output-stdout-success.json
src/test/ui/test-attrs/test-type.rs
src/test/ui/test-attrs/test-type.run.stdout

index f61a1aa84100f0c5959491e60c3238aa87ee96f5..67b5fc2ed32dcba0a77026dbaeabc095eb862074 100644 (file)
@@ -5,7 +5,7 @@
 OUTPUT_FILE_DEFAULT := $(TMPDIR)/libtest-json-output-default.json
 OUTPUT_FILE_STDOUT_SUCCESS := $(TMPDIR)/libtest-json-output-stdout-success.json
 
-all:
+all: f.rs validate_json.py output-default.json output-stdout-success.json
        $(RUSTC) --test f.rs
        RUST_BACKTRACE=0 $(call RUN,f) -Z unstable-options --test-threads=1 --format=json > $(OUTPUT_FILE_DEFAULT) || true
        RUST_BACKTRACE=0 $(call RUN,f) -Z unstable-options --test-threads=1 --format=json --show-output > $(OUTPUT_FILE_STDOUT_SUCCESS) || true
index 95ff36bd764ec40afb19495ad8844dda458e42f6..edfe25086ae9a83e5f07145ffdd27bb59e8e6331 100644 (file)
@@ -16,7 +16,7 @@ fn c() {
 }
 
 #[test]
-#[ignore]
+#[ignore = "msg"]
 fn d() {
     assert!(false);
 }
index e2c778aa8650964a540d747c0ace08018a7bda80..63342abc6ef71679a6b50f4634b1a77eda3f2446 100644 (file)
@@ -6,5 +6,5 @@
 { "type": "test", "event": "started", "name": "c" }
 { "type": "test", "name": "c", "event": "ok" }
 { "type": "test", "event": "started", "name": "d" }
-{ "type": "test", "name": "d", "event": "ignored" }
+{ "type": "test", "name": "d", "event": "ignored", "message": "msg" }
 { "type": "suite", "event": "failed", "passed": 2, "failed": 1, "ignored": 1, "measured": 0, "filtered_out": 0, "exec_time": $TIME }
index 68eb00c297ea72a175bbd3c3b952572503d62478..8f19114460e8911316c4dd1270bdce0e4bec4e3a 100644 (file)
@@ -6,5 +6,5 @@
 { "type": "test", "event": "started", "name": "c" }
 { "type": "test", "name": "c", "event": "ok", "stdout": "thread 'main' panicked at 'assertion failed: false', f.rs:15:5\n" }
 { "type": "test", "event": "started", "name": "d" }
-{ "type": "test", "name": "d", "event": "ignored" }
+{ "type": "test", "name": "d", "event": "ignored", "message": "msg" }
 { "type": "suite", "event": "failed", "passed": 2, "failed": 1, "ignored": 1, "measured": 0, "filtered_out": 0, "exec_time": $TIME }
index 3f0fa81373f10ffe1b40e3e220bb1020e4f231ff..f99e476eabae3702557e61c7608f85d2afce64bb 100644 (file)
@@ -5,7 +5,6 @@
 // ignore-emscripten no threads support
 // run-pass
 
-
 #[test]
 fn test_ok() {
     let _a = true;
@@ -18,9 +17,9 @@ fn test_panic() {
 }
 
 #[test]
-#[ignore]
+#[ignore = "msg"]
 fn test_no_run() {
-    loop{
+    loop {
         println!("Hello, world");
     }
 }
index be2fd8ae68c36420287241ba1820c5c0ef8f0895..143c13a36b7e7e77e19591990bb8c321ff1dd4c0 100644 (file)
@@ -1,6 +1,6 @@
 
 running 3 tests
-test test_no_run ... ignored
+test test_no_run ... ignored, msg
 test test_ok ... ok
 test test_panic - should panic ... ok