DynamicSchedule.m
上传用户:shenzhenrh
上传日期:2013-05-12
资源大小:2904k
文件大小:1k
源码类别:

信息检索与抽取

开发平台:

Unix_Linux

  1. /*
  2. Name:         DynamicSchedule.h
  3. Description:  DynamicSchedule tests for presence of dynamic scheduling bug, 
  4.               which used to occur when an action is added to a Schedule 
  5.       from another Schedule, to be performed after the current time, 
  6.       but before first pending action in the schedule. Due to the 
  7.       bug action was never performed.
  8. Test suite:   activity
  9. */
  10. #import <simtools.h>
  11. #import "DSSwarm.h"
  12. int 
  13. main (int argc, const char ** argv) 
  14. {
  15.   id theSwarm;
  16.   initSwarmBatch (argc, argv);
  17.   theSwarm = [DSSwarm create: globalZone];
  18.   [theSwarm buildActions];
  19.   [theSwarm activateIn: nil];
  20.   [[theSwarm getActivity] run];
  21.   
  22.   if (!ok)
  23.     {
  24.       fprintf (stderr, "Error in Schedule, dynamic update failed, action added after the current time, but before first pending action in the Schedule not performed!n");
  25.       return 1;
  26.     }
  27.   return 0;
  28. }