This repository has been archived by the owner on May 31, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed Queues, added ds_queue_copy(id,source) :)
git-svn-id: https://svn.code.sf.net/p/gjava/code@1741 0bf6c8e7-452b-0410-8c87-9aaedaf074f6
- Loading branch information
Showing
5 changed files
with
68 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* | ||
* Test ds_queue_copy | ||
*/ | ||
dsi = ds_queue_create() | ||
ds2 = ds_queue_create() | ||
ds_queue_enqueue(dsi,10) | ||
ds_queue_enqueue(dsi,11) | ||
ds_queue_enqueue(ds2,2) | ||
ds_queue_copy(ds2,dsi) | ||
show_message("Should be 10:"+string(ds_queue_dequeue(ds2))); | ||
show_message("Should be 11:"+string(ds_queue_dequeue(ds2))); | ||
show_message("Should be 0:"+string(ds_queue_dequeue(ds2))); | ||
show_message("Should be 10:"+string(ds_queue_dequeue(dsi))); | ||
ds_queue_destroy(dsi); | ||
ds_queue_destroy(ds2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,15 @@ | ||
/* | ||
* Test ds_stack_copy | ||
*/ | ||
dsi = ds_stack_create() | ||
ds2 = ds_stack_create() | ||
ds_stack_push(dsi,10) | ||
ds_stack_push(dsi,11) | ||
ds_stack_push(ds2,2) | ||
ds_stack_copy(ds2,dsi) | ||
show_message("Should be 11:"+string(ds_stack_pop(ds2))); | ||
show_message("Should be 10:"+string(ds_stack_pop(ds2))); | ||
show_message("Should be 0:"+string(ds_stack_pop(ds2))); | ||
show_message("Should be 11:"+string(ds_stack_pop(dsi))); | ||
ds_stack_destroy(dsi); | ||
ds_stack_destroy(ds2); |