Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Make sure doxygen still finds the code examples after recent data movement related...
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Sun, 23 Oct 2005 17:25:10 +0000 (17:25 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Sun, 23 Oct 2005 17:25:10 +0000 (17:25 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@1825 48e7efb5-ca39-0410-a469-dd3cf9ba447f

doc/Doxyfile.in
include/xbt/config.h
include/xbt/dynar.h
include/xbt/ex.h
src/xbt/config.c
src/xbt/dynar.c

index 21ad4e1..89bd3c0 100644 (file)
@@ -459,6 +459,7 @@ EXCLUDE_PATTERNS       =
 
 EXAMPLE_PATH           = ./ \
                          @top_srcdir@/src/surf/ \
+                         @top_srcdir@/src/xbt/ \
                          @top_srcdir@/examples \
                          @top_srcdir@/testsuite
 
index 6ecd707..27b927a 100644 (file)
@@ -54,7 +54,7 @@ SG_BEGIN_DECL()
  *
  *  \section XBT_cfg_ex Example of use
  *
- *  \dontinclude config_usage.c
+ *  \dontinclude config.c
  *
  *  First, let's create a configuration set with some registered variables.
  *  This must be done by the configurable library before the user interactions.
index ae89b02..ab156bb 100644 (file)
@@ -31,7 +31,7 @@ SG_BEGIN_DECL()
   * structure creation (of type void_f_ppvoid_t or void_f_pvoid_t).
   *
   * \section XBT_dynar_exscal Example with scalar
-  * \dontinclude dynar_int.c
+  * \dontinclude dynar.c
   *
   * \skip Vars_decl
   * \skip dyn
@@ -44,17 +44,16 @@ SG_BEGIN_DECL()
   * \until xbt_dynar_free
   *
   * \section XBT_dynar_exptr Example with pointed data
-  * \dontinclude dynar_string.c
   * 
-  * \skip doxygen_first_cruft
-  * \skip f
-  * \until xbt_init
+  * \skip doxygen_string_cruft
+  * \skip function
+  * \until s2
   * \skip Populate_str
   * \skip dyn
   * \until }
   * \skip macro
   * \until dynar_free
-  * \skip xbt_exit
+  * \skip end_of_doxygen
   * \until }
   *
   */
index afa9c7c..ad19546 100644 (file)
@@ -170,7 +170,7 @@ typedef struct { __ex_mctx_struct } __ex_mctx_t;
  * following code which shows some pitfalls and contains many errors (assuming
  * a mallocex() function which throws an exception if malloc(3) fails):
  *
- * \dontinclude ex_test.c
+ * \dontinclude ex.c
  * \skip BAD_EXAMPLE
  * \until end_of_bad_example
  *
index 618ec71..0dadc2f 100644 (file)
@@ -1232,21 +1232,32 @@ XBT_TEST_UNIT("use",test_config_use,"Data retrieving tests") {
     dyn = xbt_cfg_get_dynar(myset,"user");
 
     if (xbt_dynar_length(dyn) != 3) 
-      xbt_test_fail1("Dynar length = %d, I expected 3",
-                    (int)xbt_dynar_length(dyn));
+      xbt_test_fail1("Dynar length = %d, I expected 3", (int)xbt_dynar_length(dyn));
 
     if (strcmp(xbt_dynar_get_as(dyn,0,char*),"foo"))
-      xbt_test_fail1("Dynar[0] = %s, I expected foo",
-                    xbt_dynar_get_as(dyn,0,char*));
+      xbt_test_fail1("Dynar[0] = %s, I expected foo",   xbt_dynar_get_as(dyn,0,char*));
 
     if (strcmp(xbt_dynar_get_as(dyn,1,char*),"bar"))
-      xbt_test_fail1("Dynar[1] = %s, I expected bar",
-                    xbt_dynar_get_as(dyn,1,char*));
+      xbt_test_fail1("Dynar[1] = %s, I expected bar",   xbt_dynar_get_as(dyn,1,char*));
 
     if (strcmp(xbt_dynar_get_as(dyn,2,char*),"toto"))
-      xbt_test_fail1("Dynar[2] = %s, I expected toto",
-                    xbt_dynar_get_as(dyn,2,char*));
+      xbt_test_fail1("Dynar[2] = %s, I expected toto",  xbt_dynar_get_as(dyn,2,char*));
+    xbt_cfg_free(&myset);    
+  }
+  
+  xbt_test_add0("Access to a non-existant entry");
+  {    
+    /* non-existant_entry */
+    xbt_cfg_t myset=make_set();
     
+    TRY {
+      xbt_cfg_set_parse(myset, "color:blue");
+    } CATCH(e) {
+      if (e.category != mismatch_error)
+        xbt_test_exception(e);
+      xbt_ex_free(e);
+    }
+    xbt_cfg_free(&myset);    
   }
 }
 #endif /* SIMGRID_TEST */
index cdd7efc..e34331a 100644 (file)
@@ -808,7 +808,7 @@ XBT_TEST_UNIT("double",test_dynar_double,"Dyars of doubles") {
 }
 
 
-/* doxygen_first_cruft*/
+/* doxygen_string_cruft */
 
 /* The function we will use to free the data */
 static void free_string(void *d){
@@ -950,7 +950,6 @@ XBT_TEST_UNIT("string",test_dynar_string,"Dyars of strings") {
                  s2,buf);
       free(s2);
    }
-   xbt_dynar_free(&d);
-   xbt_dynar_free(&d);  
+   xbt_dynar_free(&d); /* end_of_doxygen */
 }
 #endif /* SIMGRID_TEST */