From: mquinson Date: Sun, 23 Oct 2005 17:25:10 +0000 (+0000) Subject: Make sure doxygen still finds the code examples after recent data movement related... X-Git-Tag: v3.3~3533 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/85897b1307bb68f05f31385803f1b3a5b806a73f Make sure doxygen still finds the code examples after recent data movement related to unitification git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@1825 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in index 21ad4e13f4..89bd3c01e4 100644 --- a/doc/Doxyfile.in +++ b/doc/Doxyfile.in @@ -459,6 +459,7 @@ EXCLUDE_PATTERNS = EXAMPLE_PATH = ./ \ @top_srcdir@/src/surf/ \ + @top_srcdir@/src/xbt/ \ @top_srcdir@/examples \ @top_srcdir@/testsuite diff --git a/include/xbt/config.h b/include/xbt/config.h index 6ecd7075a0..27b927a744 100644 --- a/include/xbt/config.h +++ b/include/xbt/config.h @@ -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. diff --git a/include/xbt/dynar.h b/include/xbt/dynar.h index ae89b0248c..ab156bbb58 100644 --- a/include/xbt/dynar.h +++ b/include/xbt/dynar.h @@ -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 } * */ diff --git a/include/xbt/ex.h b/include/xbt/ex.h index afa9c7ca86..ad19546efc 100644 --- a/include/xbt/ex.h +++ b/include/xbt/ex.h @@ -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 * diff --git a/src/xbt/config.c b/src/xbt/config.c index 618ec710df..0dadc2f331 100644 --- a/src/xbt/config.c +++ b/src/xbt/config.c @@ -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 */ diff --git a/src/xbt/dynar.c b/src/xbt/dynar.c index cdd7efccc5..e34331a518 100644 --- a/src/xbt/dynar.c +++ b/src/xbt/dynar.c @@ -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 */