- /* SD_task_dependency_add(NULL, NULL, taskA, taskD); /\* deadlock */
-
- xbt_ex_t ex;
-
- TRY {
- SD_task_dependency_add(NULL, NULL, taskA, taskA); /* shouldn't work and must raise an exception */
- xbt_die("Hey, I can add a dependency between Task A and Task A!");
- }
- CATCH (ex) {
- if (ex.category != arg_error)
-
- RETHROW; /* this is a serious error */
- xbt_ex_free(ex);
- }
-
- TRY {
- SD_task_dependency_add(NULL, NULL, taskB, taskA); /* shouldn't work and must raise an exception */
- xbt_die("Oh oh, I can add an already existing dependency!");
- }
- CATCH (ex) {
- if (ex.category != arg_error)
- RETHROW;
- xbt_ex_free(ex);
- }
-
- TRY {
- SD_task_dependency_remove(taskA, taskC); /* shouldn't work and must raise an exception */
- xbt_die("Dude, I can remove an unknown dependency!");
- }
- CATCH (ex) {
- if (ex.category != arg_error)
- RETHROW;
- xbt_ex_free(ex);
- }
-
- TRY {
- SD_task_dependency_remove(taskC, taskC); /* shouldn't work and must raise an exception */
- xbt_die("Wow, I can remove a dependency between Task C and itself!");
- }
- CATCH (ex) {
- if (ex.category != arg_error)
- RETHROW;
- xbt_ex_free(ex);
- }
-
-
- /* if everything is ok, no exception is forwarded or rethrown by main() */