Skip to content

Commit

Permalink
alcotest: add skipped test
Browse files Browse the repository at this point in the history
  • Loading branch information
Khady committed Dec 25, 2024
1 parent 270100f commit 67cb3e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions alcotest/test/alcotest_report.expected
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<testsuites><testsuite package="junit_alcotest" id="0" name="Skip test suite" timestamp="2013-05-24T10:23:58" hostname="localhost" tests="2" failures="0" errors="0" skipped="2" time="0"><properties></properties><testcase name="Skipped quick" classname="Skip test suite.Skipped tests" time="0"><skipped></skipped></testcase><testcase name="Skipped slow" classname="Skip test suite.Skipped tests" time="0"><skipped></skipped></testcase></testsuite><testsuite package="junit_alcotest" id="1" name="My first test" timestamp="2013-05-24T10:23:58" hostname="localhost" tests="4" failures="0" errors="2" skipped="0" time="0"><properties></properties><testcase name="Test with unexpected exception" classname="My first test.Basic tests" time="0"><error message="test crashed" type="exception raised">Invalid_argument(&quot;7&quot;)</error></testcase><testcase name="Capitalize" classname="My first test.Basic tests" time="0"></testcase><testcase name="Add entries" classname="My first test.Basic tests" time="0"></testcase><testcase name="Test with wrong result" classname="My first test.Basic tests" time="0"><error message="test crashed" type="exception raised">Alcotest assertion failure
<testsuites><testsuite package="junit_alcotest" id="0" name="Skip test suite" timestamp="2013-05-24T10:23:58" hostname="localhost" tests="2" failures="0" errors="0" skipped="2" time="0"><properties></properties><testcase name="Skipped quick" classname="Skip test suite.Skipped tests" time="0"><skipped></skipped></testcase><testcase name="Skipped slow" classname="Skip test suite.Skipped tests" time="0"><skipped></skipped></testcase></testsuite><testsuite package="junit_alcotest" id="1" name="My first test" timestamp="2013-05-24T10:23:58" hostname="localhost" tests="5" failures="0" errors="2" skipped="1" time="0"><properties></properties><testcase name="Test with unexpected exception" classname="My first test.Basic tests" time="0"><error message="test crashed" type="exception raised">Invalid_argument(&quot;7&quot;)</error></testcase><testcase name="Capitalize" classname="My first test.Basic tests" time="0"></testcase><testcase name="Add entries" classname="My first test.Basic tests" time="0"></testcase><testcase name="Test with wrong result" classname="My first test.Basic tests" time="0"><error message="test crashed" type="exception raised">Alcotest assertion failure
&#27;[1mFile &quot;alcotest/junit_alcotest.ml&quot;, line 22, character 6:
&#27;[0m&#27;[31mFAIL&#27;[0m string_of_int equals to '7'

Expected: `&#27;[32m&quot;7&quot;&#27;[0m'
Received: `&#27;[31m&quot;8&quot;&#27;[0m'

</error></testcase></testsuite><testsuite package="junit_alcotest" id="2" name="My second test" timestamp="2013-05-24T10:23:58" hostname="localhost" tests="4" failures="0" errors="2" skipped="0" time="0"><properties></properties><testcase name="Test with unexpected exception" classname="My second test.Basic tests" time="0"><error message="test crashed" type="exception raised">Invalid_argument(&quot;7&quot;)</error></testcase><testcase name="Capitalize" classname="My second test.Basic tests" time="0"></testcase><testcase name="Add entries" classname="My second test.Basic tests" time="0"></testcase><testcase name="Test with wrong result" classname="My second test.Basic tests" time="0"><error message="test crashed" type="exception raised">Alcotest assertion failure
</error></testcase><testcase name="Test skipped" classname="My first test.Basic tests" time="0"><skipped></skipped></testcase></testsuite><testsuite package="junit_alcotest" id="2" name="My second test" timestamp="2013-05-24T10:23:58" hostname="localhost" tests="5" failures="0" errors="2" skipped="1" time="0"><properties></properties><testcase name="Test with unexpected exception" classname="My second test.Basic tests" time="0"><error message="test crashed" type="exception raised">Invalid_argument(&quot;7&quot;)</error></testcase><testcase name="Capitalize" classname="My second test.Basic tests" time="0"></testcase><testcase name="Add entries" classname="My second test.Basic tests" time="0"></testcase><testcase name="Test with wrong result" classname="My second test.Basic tests" time="0"><error message="test crashed" type="exception raised">Alcotest assertion failure
&#27;[1mFile &quot;alcotest/junit_alcotest.ml&quot;, line 22, character 6:
&#27;[0m&#27;[31mFAIL&#27;[0m string_of_int equals to '7'

Expected: `&#27;[32m&quot;7&quot;&#27;[0m'
Received: `&#27;[31m&quot;8&quot;&#27;[0m'

</error></testcase></testsuite><testsuite package="junit_alcotest" id="3" name="Success test suite" timestamp="2013-05-24T10:23:58" hostname="localhost" tests="2" failures="0" errors="0" skipped="0" time="0"><properties></properties><testcase name="Capitalize" classname="Success test suite.Good tests" time="0"></testcase><testcase name="Add entries" classname="Success test suite.Good tests" time="0"></testcase></testsuite></testsuites>
</error></testcase><testcase name="Test skipped" classname="My second test.Basic tests" time="0"><skipped></skipped></testcase></testsuite><testsuite package="junit_alcotest" id="3" name="Success test suite" timestamp="2013-05-24T10:23:58" hostname="localhost" tests="2" failures="0" errors="0" skipped="0" time="0"><properties></properties><testcase name="Capitalize" classname="Success test suite.Good tests" time="0"></testcase><testcase name="Add entries" classname="Success test suite.Good tests" time="0"></testcase></testsuite></testsuites>
1 change: 1 addition & 0 deletions alcotest/test/alcotest_report.ml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ let test_set =
; A.test_case "Capitalize" `Quick capit
; A.test_case "Add entries" `Slow plus
; A.test_case "Test with wrong result" `Quick wrong_result
; A.test_case "Test skipped" `Quick (fun () -> A.skip ())
]
;;

Expand Down

0 comments on commit 67cb3e7

Please sign in to comment.