Commits

Matt Oswald  committed 24372cd Draft

Edited online

  • Participants
  • Parent commits eba73e1

Comments (0)

Files changed (1)

File SuitesAndAttributes.wiki

 }
 }}}
 
-==== Skipping Tests ====
+=== Skipping Tests ===
 
-There is one special attribute key, //"Skip"// (capitalization required). Any tests with "Skip" as an attribute key will be ignored at run time and the attribute value will be printed as the reason for skipping the test.
+There is one special attribute, //"Skip"// (capitalization required). Any tests with "Skip" as an attribute key will be ignored at run time and the attribute value will be printed as the reason for skipping the test.
 
 {{{
 #!c++
 ATTRIBUTES(("Skip", "Takes way too long to complete. Need to refactor"))
 {
 
-TIMED_FACT(TestName, 0)
+TIMED_FACT("Test name", 0)
 {
     // do some long-running work that makes the test process take too long:
     std::this_thread::sleep_for(std::chrono::seconds(10));
 }
 
 }
+
+// If the "Skip" attribute is the only attribute, then the SKIP macro can be used as a short-cut.
+SKIP("Another test to skip")
+{
+
+FACT("Do nothing")
+{
+}
+
+}
 }}}
 
-Importantly, skipped tests will never be instantiated, so no long-running fixture or theory setup will be run.
+Importantly, skipped tests will never be instantiated, so no long-running fixture or theory setup will be run.