From 1785ab3504810c020e2581337c72aa6697c3e209 Mon Sep 17 00:00:00 2001
From: Martin Nilsson <mani@lysator.liu.se>
Date: Thu, 10 Apr 2003 21:31:48 +0200
Subject: [PATCH] Added more macros

Rev: refdoc/chapters/testsuite.xml:1.12
---
 refdoc/chapters/testsuite.xml | 41 ++++++++++++++++++++++++++++++-----
 1 file changed, 36 insertions(+), 5 deletions(-)

diff --git a/refdoc/chapters/testsuite.xml b/refdoc/chapters/testsuite.xml
index 08a739e8fc..87bb6d267d 100644
--- a/refdoc/chapters/testsuite.xml
+++ b/refdoc/chapters/testsuite.xml
@@ -236,7 +236,7 @@ Total tests: 1  (0 tests skipped)
   tests cases. A good test suite for a function includes both some
   trivial tests to ensure that the basic functionality works and some
   nasty tests to test the borderlands of what the function is capable
-  of.</p>
+  of, e.g. empty in parameters.</p>
 
   <p>Also, when a bug in Pike has been found, a minimized test case
   the triggers the bug should also be added to the test suite. After
@@ -259,8 +259,8 @@ test_any([[
   <subsection title="test_any_equal">
     <p>The test_any_equal macro tests if the result of two pike
     expressions are identical, e.g. if equal(a,b). The first
-    expression should be a complete block, while the other expression
-    should be a simple pike statement.</p>
+    expression should be a complete block, that returns a value, while
+    the other expression should be a simple pike statement.</p>
     <example>
 test_any_equal([[
   mixed a=({1,2,3});
@@ -327,10 +327,41 @@ test_compile([[Stdio.File foo=Stdio.File();]])
   </subsection>
 
   <subsection title="test_compile_any">
+    <p>Tests if the code compiles, just as <tt>test_compile</tt>, but
+    is a complete block of code and not just an expression.</p>
+<example>
+test_compile_any([[
+  void foo() 
+  {
+    Stdio.File bar(int x, int y)
+    { 
+      return 0;
+    }; 
+  } 
+]])
+</example>
+  </subsection>
+
+  <subsection title="test_compile_error">
+    <p>Does the inverse of <tt>test_compile</tt>; verifies that the
+    code does not compile.</p>
+<example>
+test_compile_error([[ int a="a"; ]])
+</example>
+  </subsection>
+
+  <subsection title="test_compile_error_any">
+    <p>Does the inverse of <tt>test_compile_any</tt>; verifies that
+    the code does not compile.</p>
+<example>
+test_compile_error_any([[
+  int a=5;
+  string b="a";
+  a=b;
+]])
+</example>
   </subsection>
 
-  <subsection title="test_compile_error" />
-  <subsection title="test_compile_error_any" />
   <subsection title="test_compile_warning" />
   <subsection title="test_compile_warning_any" />
   <subsection title="test_eval_error" />
-- 
GitLab