- Timestamp:
- Jun 12, 2023, 12:05:58 PM (3 years ago)
- Branches:
- master
- Children:
- fec8bd1
- Parents:
- 2b78949 (diff), 38e266ca (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- tests
- Files:
-
- 8 added
- 3 deleted
- 10 edited
- 198 moved
-
.expect/array-ERR1.txt (added)
-
.expect/array-ERR2.txt (added)
-
.expect/array-ERR3.txt (added)
-
.expect/array.txt (modified) (1 diff)
-
.expect/copyfile.txt (modified) (2 diffs)
-
.in/copyfile.txt (modified) (2 diffs)
-
Makefile.am (modified) (8 diffs)
-
PRNG.cfa (modified) (1 diff)
-
array.cfa (modified) (1 diff)
-
concurrency/.expect/clib.txt (moved) (moved from tests/concurrent/.expect/clib.txt )
-
concurrency/.expect/clib_tls.txt (moved) (moved from tests/concurrent/.expect/clib_tls.txt )
-
concurrency/.expect/cluster.txt (moved) (moved from tests/concurrent/.expect/cluster.txt )
-
concurrency/.expect/coroutineYield.txt (moved) (moved from tests/concurrent/.expect/coroutineYield.txt )
-
concurrency/.expect/ctor-check.txt (moved) (moved from tests/concurrent/.expect/ctor-check.txt ) (1 diff)
-
concurrency/.expect/join.txt (moved) (moved from tests/concurrent/.expect/join.txt )
-
concurrency/.expect/joinerror.sed (moved) (moved from tests/concurrent/.expect/joinerror.sed )
-
concurrency/.expect/keywordErrors.txt (added)
-
concurrency/.expect/lockfree_stack.txt (moved) (moved from tests/concurrent/.expect/migrate.txt )
-
concurrency/.expect/mainError.txt (added)
-
concurrency/.expect/migrate.txt (moved) (moved from tests/concurrent/barrier/.expect/last.txt )
-
concurrency/.expect/monitor.txt (moved) (moved from tests/concurrent/.expect/monitor.txt )
-
concurrency/.expect/multi-monitor.txt (moved) (moved from tests/concurrent/.expect/multi-monitor.txt )
-
concurrency/.expect/once.txt (moved) (moved from tests/concurrent/.expect/once.txt )
-
concurrency/.expect/preempt.txt (moved) (moved from tests/concurrent/.expect/preempt.txt )
-
concurrency/.expect/preempt2.txt (moved) (moved from tests/concurrent/.expect/preempt2.txt )
-
concurrency/.expect/sleep.txt (moved) (moved from tests/concurrent/.expect/sleep.txt )
-
concurrency/.expect/suspend_then.txt (moved) (moved from tests/concurrent/.expect/suspend_then.txt )
-
concurrency/.expect/thread.txt (moved) (moved from tests/concurrent/.expect/thread.txt )
-
concurrency/actors/.expect/dynamic.txt (moved) (moved from tests/concurrent/actors/.expect/dynamic.txt )
-
concurrency/actors/.expect/executor.txt (moved) (moved from tests/concurrent/actors/.expect/executor.txt )
-
concurrency/actors/.expect/inherit.txt (moved) (moved from tests/concurrent/actors/.expect/inherit.txt )
-
concurrency/actors/.expect/matrix.txt (moved) (moved from tests/concurrent/actors/.expect/matrix.txt )
-
concurrency/actors/.expect/pingpong.txt (moved) (moved from tests/concurrent/actors/.expect/pingpong.txt )
-
concurrency/actors/.expect/poison.txt (moved) (moved from tests/concurrent/actors/.expect/poison.txt )
-
concurrency/actors/.expect/static.txt (moved) (moved from tests/concurrent/actors/.expect/static.txt )
-
concurrency/actors/.expect/types.txt (moved) (moved from tests/concurrent/actors/.expect/types.txt )
-
concurrency/actors/dynamic.cfa (moved) (moved from tests/concurrent/actors/dynamic.cfa ) (1 diff)
-
concurrency/actors/executor.cfa (moved) (moved from tests/concurrent/actors/executor.cfa ) (1 diff)
-
concurrency/actors/inherit.cfa (moved) (moved from tests/concurrent/actors/inherit.cfa ) (1 diff)
-
concurrency/actors/matrix.cfa (moved) (moved from tests/concurrent/actors/matrix.cfa ) (1 diff)
-
concurrency/actors/pingpong.cfa (moved) (moved from tests/concurrent/actors/pingpong.cfa ) (2 diffs)
-
concurrency/actors/poison.cfa (moved) (moved from tests/concurrent/actors/poison.cfa ) (3 diffs)
-
concurrency/actors/static.cfa (moved) (moved from tests/concurrent/actors/static.cfa ) (1 diff)
-
concurrency/actors/types.cfa (moved) (moved from tests/concurrent/actors/types.cfa ) (5 diffs)
-
concurrency/barrier/.expect/generation.txt (moved) (moved from tests/concurrent/barrier/.expect/generation.txt )
-
concurrency/barrier/.expect/last.txt (moved) (moved from tests/concurrent/barrier/.expect/order.txt )
-
concurrency/barrier/.expect/order.txt (moved) (moved from tests/concurrent/examples/.expect/datingService.txt )
-
concurrency/barrier/gen_generation_expect.cfa (moved) (moved from tests/concurrent/barrier/gen_generation_expect.cfa ) (1 diff)
-
concurrency/barrier/generation.cfa (moved) (moved from tests/concurrent/barrier/generation.cfa ) (1 diff)
-
concurrency/barrier/last.cfa (moved) (moved from tests/concurrent/barrier/last.cfa ) (1 diff)
-
concurrency/barrier/order.cfa (moved) (moved from tests/concurrent/barrier/order.cfa ) (1 diff)
-
concurrency/channels/.expect/big_elems.txt (moved) (moved from tests/concurrent/channels/.expect/big_elems.txt )
-
concurrency/channels/.expect/churn.txt (moved) (moved from tests/concurrent/channels/.expect/churn.txt )
-
concurrency/channels/.expect/contend.txt (moved) (moved from tests/concurrent/channels/.expect/contend.txt )
-
concurrency/channels/.expect/daisy_chain.txt (moved) (moved from tests/concurrent/channels/.expect/daisy_chain.txt )
-
concurrency/channels/.expect/hot_potato.txt (moved) (moved from tests/concurrent/channels/.expect/hot_potato.txt )
-
concurrency/channels/.expect/ping_pong.txt (moved) (moved from tests/concurrent/channels/.expect/ping_pong.txt )
-
concurrency/channels/.expect/pub_sub.txt (moved) (moved from tests/concurrent/channels/.expect/pub_sub.txt )
-
concurrency/channels/.expect/zero_size.txt (moved) (moved from tests/concurrent/channels/.expect/zero_size.txt )
-
concurrency/channels/barrier.cfa (moved) (moved from tests/concurrent/channels/barrier.cfa )
-
concurrency/channels/big_elems.cfa (moved) (moved from tests/concurrent/channels/big_elems.cfa )
-
concurrency/channels/churn.cfa (moved) (moved from tests/concurrent/channels/churn.cfa )
-
concurrency/channels/contend.cfa (moved) (moved from tests/concurrent/channels/contend.cfa )
-
concurrency/channels/daisy_chain.cfa (moved) (moved from tests/concurrent/channels/daisy_chain.cfa )
-
concurrency/channels/hot_potato.cfa (moved) (moved from tests/concurrent/channels/hot_potato.cfa )
-
concurrency/channels/parallel_harness.hfa (moved) (moved from tests/concurrent/channels/parallel_harness.hfa )
-
concurrency/channels/ping_pong.cfa (moved) (moved from tests/concurrent/channels/ping_pong.cfa )
-
concurrency/channels/pub_sub.cfa (moved) (moved from tests/concurrent/channels/pub_sub.cfa )
-
concurrency/channels/zero_size.cfa (moved) (moved from tests/concurrent/channels/zero_size.cfa )
-
concurrency/clib.c (moved) (moved from tests/concurrent/clib.c )
-
concurrency/clib_tls.c (moved) (moved from tests/concurrent/clib_tls.c )
-
concurrency/cluster.cfa (moved) (moved from tests/concurrent/cluster.cfa )
-
concurrency/coroutineYield.cfa (moved) (moved from tests/concurrent/coroutineYield.cfa )
-
concurrency/ctor-check.cfa (moved) (moved from tests/concurrent/ctor-check.cfa )
-
concurrency/examples/.expect/boundedBufferEXT.txt (moved) (moved from tests/concurrent/examples/.expect/boundedBufferEXT.txt )
-
concurrency/examples/.expect/boundedBufferINT.txt (moved) (moved from tests/concurrent/examples/.expect/boundedBufferINT.txt )
-
concurrency/examples/.expect/datingService.txt (moved) (moved from tests/concurrent/park/.expect/force_preempt.txt )
-
concurrency/examples/.expect/gortn.txt (moved) (moved from tests/concurrent/examples/.expect/gortn.txt )
-
concurrency/examples/.expect/matrixSum.txt (moved) (moved from tests/concurrent/examples/.expect/matrixSum.txt )
-
concurrency/examples/.expect/quickSort.txt (moved) (moved from tests/concurrent/examples/.expect/quickSort.txt )
-
concurrency/examples/.in/quickSort.txt (moved) (moved from tests/concurrent/examples/.in/quickSort.txt )
-
concurrency/examples/boundedBufferEXT.cfa (moved) (moved from tests/concurrent/examples/boundedBufferEXT.cfa )
-
concurrency/examples/boundedBufferINT.cfa (moved) (moved from tests/concurrent/examples/boundedBufferINT.cfa )
-
concurrency/examples/boundedBufferTHREAD.cfa (moved) (moved from tests/concurrent/examples/boundedBufferTHREAD.cfa )
-
concurrency/examples/datingService.cfa (moved) (moved from tests/concurrent/examples/datingService.cfa )
-
concurrency/examples/gortn.cfa (moved) (moved from tests/concurrent/examples/gortn.cfa )
-
concurrency/examples/matrixSum.cfa (moved) (moved from tests/concurrent/examples/matrixSum.cfa )
-
concurrency/examples/multiSort.cfa (moved) (moved from tests/concurrent/examples/multiSort.cfa )
-
concurrency/examples/quickSort.cfa (moved) (moved from tests/concurrent/examples/quickSort.cfa )
-
concurrency/examples/quickSort.generic.cfa (moved) (moved from tests/concurrent/examples/quickSort.generic.cfa )
-
concurrency/futures/.expect/abandon.txt (moved) (moved from tests/concurrent/futures/.expect/abandon.txt )
-
concurrency/futures/.expect/basic.txt (moved) (moved from tests/concurrent/futures/.expect/basic.txt )
-
concurrency/futures/.expect/multi.txt (moved) (moved from tests/concurrent/futures/.expect/multi.txt )
-
concurrency/futures/.expect/select_future.txt (moved) (moved from tests/concurrent/futures/.expect/select_future.txt )
-
concurrency/futures/.expect/typed.txt (moved) (moved from tests/concurrent/futures/.expect/typed.txt )
-
concurrency/futures/.expect/wait_any.txt (moved) (moved from tests/concurrent/futures/.expect/wait_any.txt )
-
concurrency/futures/abandon.cfa (moved) (moved from tests/concurrent/futures/abandon.cfa )
-
concurrency/futures/basic.cfa (moved) (moved from tests/concurrent/futures/basic.cfa )
-
concurrency/futures/multi.cfa (moved) (moved from tests/concurrent/futures/multi.cfa )
-
concurrency/futures/select_future.cfa (moved) (moved from tests/concurrent/futures/select_future.cfa )
-
concurrency/futures/typed.cfa (moved) (moved from tests/concurrent/futures/typed.cfa )
-
concurrency/futures/wait_any.cfa (moved) (moved from tests/concurrent/futures/wait_any.cfa )
-
concurrency/join.cfa (moved) (moved from tests/concurrent/join.cfa )
-
concurrency/joinerror.cfa (moved) (moved from tests/concurrent/joinerror.cfa )
-
concurrency/keywordErrors.cfa (moved) (moved from tests/concurrent/keywordErrors.cfa )
-
concurrency/lockfree_stack.cfa (added)
-
concurrency/mainError.cfa (moved) (moved from tests/concurrent/mainError.cfa )
-
concurrency/migrate.cfa (moved) (moved from tests/concurrent/migrate.cfa )
-
concurrency/monitor.cfa (moved) (moved from tests/concurrent/monitor.cfa )
-
concurrency/multi-monitor.cfa (moved) (moved from tests/concurrent/multi-monitor.cfa )
-
concurrency/mutexstmt/.expect/locks.txt (moved) (moved from tests/concurrent/mutexstmt/.expect/locks.txt )
-
concurrency/mutexstmt/.expect/monitors.txt (moved) (moved from tests/concurrent/mutexstmt/.expect/monitors.txt )
-
concurrency/mutexstmt/locks.cfa (moved) (moved from tests/concurrent/mutexstmt/locks.cfa )
-
concurrency/mutexstmt/monitors.cfa (moved) (moved from tests/concurrent/mutexstmt/monitors.cfa )
-
concurrency/once.cfa (moved) (moved from tests/concurrent/once.cfa )
-
concurrency/park/.expect/contention.txt (moved) (moved from tests/concurrent/park/.expect/contention.txt )
-
concurrency/park/.expect/force_preempt.txt (moved) (moved from tests/concurrent/park/.expect/start_parked.txt )
-
concurrency/park/.expect/start_parked.txt (added)
-
concurrency/park/contention.cfa (moved) (moved from tests/concurrent/park/contention.cfa )
-
concurrency/park/force_preempt.cfa (moved) (moved from tests/concurrent/park/force_preempt.cfa )
-
concurrency/park/start_parked.cfa (moved) (moved from tests/concurrent/park/start_parked.cfa )
-
concurrency/preempt.cfa (moved) (moved from tests/concurrent/preempt.cfa )
-
concurrency/preempt2.cfa (moved) (moved from tests/concurrent/preempt2.cfa )
-
concurrency/pthread/.expect/bounded_buffer.x64.txt (moved) (moved from tests/concurrent/pthread/.expect/bounded_buffer.x64.txt )
-
concurrency/pthread/.expect/bounded_buffer.x86.txt (moved) (moved from tests/concurrent/pthread/.expect/bounded_buffer.x86.txt )
-
concurrency/pthread/.expect/pthread_attr_test.txt (moved) (moved from tests/concurrent/pthread/.expect/pthread_attr_test.txt )
-
concurrency/pthread/.expect/pthread_cond_test.txt (moved) (moved from tests/concurrent/pthread/.expect/pthread_cond_test.txt )
-
concurrency/pthread/.expect/pthread_demo_create_join.txt (moved) (moved from tests/concurrent/pthread/.expect/pthread_demo_create_join.txt )
-
concurrency/pthread/.expect/pthread_demo_lock.txt (moved) (moved from tests/concurrent/pthread/.expect/pthread_demo_lock.txt )
-
concurrency/pthread/.expect/pthread_key_test.txt (moved) (moved from tests/concurrent/pthread/.expect/pthread_key_test.txt )
-
concurrency/pthread/.expect/pthread_once_test.txt (moved) (moved from tests/concurrent/pthread/.expect/pthread_once_test.txt )
-
concurrency/pthread/bounded_buffer.cfa (moved) (moved from tests/concurrent/pthread/bounded_buffer.cfa )
-
concurrency/pthread/pthread_attr_test.cfa (moved) (moved from tests/concurrent/pthread/pthread_attr_test.cfa )
-
concurrency/pthread/pthread_cond_test.cfa (moved) (moved from tests/concurrent/pthread/pthread_cond_test.cfa )
-
concurrency/pthread/pthread_demo_create_join.cfa (moved) (moved from tests/concurrent/pthread/pthread_demo_create_join.cfa )
-
concurrency/pthread/pthread_demo_lock.cfa (moved) (moved from tests/concurrent/pthread/pthread_demo_lock.cfa )
-
concurrency/pthread/pthread_key_test.cfa (moved) (moved from tests/concurrent/pthread/pthread_key_test.cfa )
-
concurrency/pthread/pthread_once_test.cfa (moved) (moved from tests/concurrent/pthread/pthread_once_test.cfa )
-
concurrency/readyQ/.expect/barrier_sleeper.txt (moved) (moved from tests/concurrent/readyQ/.expect/barrier_sleeper.txt )
-
concurrency/readyQ/.expect/leader_spin.txt (moved) (moved from tests/concurrent/readyQ/.expect/leader_spin.txt )
-
concurrency/readyQ/barrier_sleeper.cfa (moved) (moved from tests/concurrent/readyQ/barrier_sleeper.cfa ) (1 diff)
-
concurrency/readyQ/leader_spin.cfa (moved) (moved from tests/concurrent/readyQ/leader_spin.cfa ) (1 diff)
-
concurrency/signal/.expect/block.txt (moved) (moved from tests/concurrent/signal/.expect/block.txt )
-
concurrency/signal/.expect/disjoint.txt (moved) (moved from tests/concurrent/signal/.expect/disjoint.txt )
-
concurrency/signal/.expect/wait.txt (moved) (moved from tests/concurrent/signal/.expect/wait.txt )
-
concurrency/signal/block.cfa (moved) (moved from tests/concurrent/signal/block.cfa )
-
concurrency/signal/disjoint.cfa (moved) (moved from tests/concurrent/signal/disjoint.cfa )
-
concurrency/signal/wait.cfa (moved) (moved from tests/concurrent/signal/wait.cfa )
-
concurrency/sleep.cfa (moved) (moved from tests/concurrent/sleep.cfa )
-
concurrency/suspend_then.cfa (moved) (moved from tests/concurrent/suspend_then.cfa )
-
concurrency/thread.cfa (moved) (moved from tests/concurrent/thread.cfa )
-
concurrency/unified_locking/.expect/block_spin_lock.txt (moved) (moved from tests/concurrent/unified_locking/.expect/block_spin_lock.txt )
-
concurrency/unified_locking/.expect/exp_backoff.txt (moved) (moved from tests/concurrent/unified_locking/.expect/exp_backoff.txt )
-
concurrency/unified_locking/.expect/fast_block_lock.txt (moved) (moved from tests/concurrent/unified_locking/.expect/fast_block_lock.txt )
-
concurrency/unified_locking/.expect/futex_mutex.txt (moved) (moved from tests/concurrent/unified_locking/.expect/futex_mutex.txt )
-
concurrency/unified_locking/.expect/locks.txt (moved) (moved from tests/concurrent/unified_locking/.expect/locks.txt )
-
concurrency/unified_locking/.expect/mcs.txt (moved) (moved from tests/concurrent/unified_locking/.expect/mcs.txt )
-
concurrency/unified_locking/.expect/mcs_block_spin_lock.txt (moved) (moved from tests/concurrent/unified_locking/.expect/mcs_block_spin_lock.txt )
-
concurrency/unified_locking/.expect/mcs_spin.txt (moved) (moved from tests/concurrent/unified_locking/.expect/mcs_spin.txt )
-
concurrency/unified_locking/.expect/pthread_locks.txt (moved) (moved from tests/concurrent/unified_locking/.expect/pthread_locks.txt )
-
concurrency/unified_locking/.expect/simple_owner_lock.txt (moved) (moved from tests/concurrent/unified_locking/.expect/simple_owner_lock.txt )
-
concurrency/unified_locking/.expect/spin_queue_lock.txt (moved) (moved from tests/concurrent/unified_locking/.expect/spin_queue_lock.txt )
-
concurrency/unified_locking/.expect/timeout_lock.txt (moved) (moved from tests/concurrent/unified_locking/.expect/timeout_lock.txt )
-
concurrency/unified_locking/block_spin_lock.cfa (moved) (moved from tests/concurrent/unified_locking/block_spin_lock.cfa )
-
concurrency/unified_locking/exp_backoff.cfa (moved) (moved from tests/concurrent/unified_locking/exp_backoff.cfa )
-
concurrency/unified_locking/fast_block_lock.cfa (moved) (moved from tests/concurrent/unified_locking/fast_block_lock.cfa )
-
concurrency/unified_locking/futex_mutex.cfa (moved) (moved from tests/concurrent/unified_locking/futex_mutex.cfa )
-
concurrency/unified_locking/locks.cfa (moved) (moved from tests/concurrent/unified_locking/locks.cfa )
-
concurrency/unified_locking/mcs.cfa (moved) (moved from tests/concurrent/unified_locking/mcs.cfa )
-
concurrency/unified_locking/mcs_block_spin_lock.cfa (moved) (moved from tests/concurrent/unified_locking/mcs_block_spin_lock.cfa )
-
concurrency/unified_locking/mcs_spin.cfa (moved) (moved from tests/concurrent/unified_locking/mcs_spin.cfa )
-
concurrency/unified_locking/mutex_test.hfa (moved) (moved from tests/concurrent/unified_locking/mutex_test.hfa )
-
concurrency/unified_locking/pthread_locks.cfa (moved) (moved from tests/concurrent/unified_locking/pthread_locks.cfa )
-
concurrency/unified_locking/simple_owner_lock.cfa (moved) (moved from tests/concurrent/unified_locking/simple_owner_lock.cfa )
-
concurrency/unified_locking/spin_queue_lock.cfa (moved) (moved from tests/concurrent/unified_locking/spin_queue_lock.cfa )
-
concurrency/unified_locking/spintest.cfa (moved) (moved from tests/concurrent/unified_locking/spintest.cfa )
-
concurrency/unified_locking/test_debug.cfa (moved) (moved from tests/concurrent/unified_locking/test_debug.cfa )
-
concurrency/unified_locking/thread_test.cfa (moved) (moved from tests/concurrent/unified_locking/thread_test.cfa )
-
concurrency/unified_locking/timeout_lock.cfa (moved) (moved from tests/concurrent/unified_locking/timeout_lock.cfa )
-
concurrency/waitfor/.expect/barge.txt (moved) (moved from tests/concurrent/waitfor/.expect/barge.txt )
-
concurrency/waitfor/.expect/dtor.txt (moved) (moved from tests/concurrent/waitfor/.expect/dtor.txt )
-
concurrency/waitfor/.expect/else.txt (moved) (moved from tests/concurrent/waitfor/.expect/else.txt )
-
concurrency/waitfor/.expect/parse.txt (added)
-
concurrency/waitfor/.expect/recurse.txt (moved) (moved from tests/concurrent/waitfor/.expect/recurse.txt )
-
concurrency/waitfor/.expect/statment.txt (moved) (moved from tests/concurrent/waitfor/.expect/statment.txt )
-
concurrency/waitfor/.expect/when.txt (moved) (moved from tests/concurrent/waitfor/.expect/when.txt )
-
concurrency/waitfor/barge.cfa (moved) (moved from tests/concurrent/waitfor/barge.cfa )
-
concurrency/waitfor/dtor.cfa (moved) (moved from tests/concurrent/waitfor/dtor.cfa )
-
concurrency/waitfor/else.cfa (moved) (moved from tests/concurrent/waitfor/else.cfa )
-
concurrency/waitfor/parse.cfa (moved) (moved from tests/concurrent/waitfor/parse.cfa )
-
concurrency/waitfor/recurse.cfa (moved) (moved from tests/concurrent/waitfor/recurse.cfa )
-
concurrency/waitfor/simple.cfa (moved) (moved from tests/concurrent/waitfor/simple.cfa )
-
concurrency/waitfor/statment.cfa (moved) (moved from tests/concurrent/waitfor/statment.cfa )
-
concurrency/waitfor/when.cfa (moved) (moved from tests/concurrent/waitfor/when.cfa )
-
concurrency/waituntil/.expect/all_types.txt (moved) (moved from tests/concurrent/waituntil/.expect/all_types.txt )
-
concurrency/waituntil/.expect/basic_else.txt (moved) (moved from tests/concurrent/waituntil/.expect/basic_else.txt )
-
concurrency/waituntil/.expect/channel_close.txt (moved) (moved from tests/concurrent/waituntil/.expect/channel_close.txt )
-
concurrency/waituntil/.expect/channel_zero_size.txt (moved) (moved from tests/concurrent/waituntil/.expect/channel_zero_size.txt )
-
concurrency/waituntil/.expect/channels.txt (moved) (moved from tests/concurrent/waituntil/.expect/channels.txt )
-
concurrency/waituntil/.expect/futures.txt (moved) (moved from tests/concurrent/waituntil/.expect/futures.txt )
-
concurrency/waituntil/.expect/locks.txt (moved) (moved from tests/concurrent/waituntil/.expect/locks.txt )
-
concurrency/waituntil/.expect/one_chan.txt (moved) (moved from tests/concurrent/waituntil/.expect/one_chan.txt )
-
concurrency/waituntil/.expect/timeout.txt (moved) (moved from tests/concurrent/waituntil/.expect/timeout.txt )
-
concurrency/waituntil/all_types.cfa (moved) (moved from tests/concurrent/waituntil/all_types.cfa )
-
concurrency/waituntil/basic_else.cfa (moved) (moved from tests/concurrent/waituntil/basic_else.cfa )
-
concurrency/waituntil/channel_close.cfa (moved) (moved from tests/concurrent/waituntil/channel_close.cfa )
-
concurrency/waituntil/channel_zero_size.cfa (moved) (moved from tests/concurrent/waituntil/channel_zero_size.cfa )
-
concurrency/waituntil/channels.cfa (moved) (moved from tests/concurrent/waituntil/channels.cfa )
-
concurrency/waituntil/futures.cfa (moved) (moved from tests/concurrent/waituntil/futures.cfa )
-
concurrency/waituntil/locks.cfa (moved) (moved from tests/concurrent/waituntil/locks.cfa ) (1 diff)
-
concurrency/waituntil/one_chan.cfa (moved) (moved from tests/concurrent/waituntil/one_chan.cfa )
-
concurrency/waituntil/timeout.cfa (moved) (moved from tests/concurrent/waituntil/timeout.cfa )
-
concurrent/.expect/keywordErrors.txt (deleted)
-
concurrent/.expect/mainError.txt (deleted)
-
configs/.expect/parseconfig.txt (modified) (1 diff)
-
configs/parseconfig.cfa (modified) (1 diff)
-
copyfile.cfa (modified) (2 diffs)
-
rational.cfa (modified) (6 diffs)
-
zombies/simplePoly.c (deleted)
Legend:
- Unmodified
- Added
- Removed
-
tests/.expect/array.txt
r2b78949 r8a930c03 1 array.cfa: 52:25: warning: Compiled1 array.cfa:119:25: warning: Preprocessor started -
tests/.expect/copyfile.txt
r2b78949 r8a930c03 10 10 // Created On : Fri Jun 19 13:44:05 2020 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jun 19 17:58:03 202013 // Update Count : 412 // Last Modified On : Mon Jun 5 21:20:07 2023 13 // Update Count : 5 14 14 // 15 15 … … 30 30 exit | "Usage" | argv[0] | "[ input-file (default stdin) [ output-file (default stdout) ] ]"; 31 31 } // choose 32 } catch( Open_Failure * ex ; ex->istream == &in ) {32 } catch( open_failure * ex ; ex->istream == &in ) { 33 33 exit | "Unable to open input file" | argv[1]; 34 } catch( Open_Failure * ex ; ex->ostream == &out ) {34 } catch( open_failure * ex ; ex->ostream == &out ) { 35 35 close( in ); // optional 36 36 exit | "Unable to open output file" | argv[2]; -
tests/.in/copyfile.txt
r2b78949 r8a930c03 10 10 // Created On : Fri Jun 19 13:44:05 2020 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jun 19 17:58:03 202013 // Update Count : 412 // Last Modified On : Mon Jun 5 21:20:07 2023 13 // Update Count : 5 14 14 // 15 15 … … 30 30 exit | "Usage" | argv[0] | "[ input-file (default stdin) [ output-file (default stdout) ] ]"; 31 31 } // choose 32 } catch( Open_Failure * ex ; ex->istream == &in ) {32 } catch( open_failure * ex ; ex->istream == &in ) { 33 33 exit | "Unable to open input file" | argv[1]; 34 } catch( Open_Failure * ex ; ex->ostream == &out ) {34 } catch( open_failure * ex ; ex->ostream == &out ) { 35 35 close( in ); // optional 36 36 exit | "Unable to open output file" | argv[2]; -
tests/Makefile.am
r2b78949 r8a930c03 11 11 ## Created On : Sun May 31 09:08:15 2015 12 12 ## Last Modified By : Peter A. Buhr 13 ## Last Modified On : Tue May 16 09:27:48202314 ## Update Count : 1 7813 ## Last Modified On : Sun May 28 08:15:43 2023 14 ## Update Count : 196 15 15 ############################################################################### 16 16 … … 26 26 ARCH = ${if ${arch},"--arch=${arch}"} 27 27 arch_support = "x86/x64/arm" 28 TIMEOUT = ${if ${timeout},"--timeout=${timeout}"} 29 GLOBAL_TIMEOUT = ${if ${global-timeout},"--global-timeout=${global-timeout}"} 30 ARCHIVE_ERRORS = ${if ${archive-errors},"--archive-errors=${archive-errors}"} 31 28 32 DEBUG_FLAGS = -debug -g -O0 29 33 30 34 quick_test = avl_test operators numericConstants expression enum array typeof cast raii/dtor-early-exit raii/init_once attributes meta/dumpable 31 32 archiveerrors=33 concurrent=34 timeouts=35 35 36 36 TEST_PY = python3 ${builddir}/test.py … … 67 67 PRETTY_PATH = mkdir -p ${dir ${abspath ${@}}} && cd ${srcdir} && 68 68 69 .PHONY : list .validate .test_makeflags69 .PHONY : concurrency list .validate .test_makeflags 70 70 .INTERMEDIATE : .validate .validate.cfa .test_makeflags 71 71 EXTRA_PROGRAMS = avl_test linkonce linking/mangling/anon .dummy_hack # build but do not install … … 79 79 avltree/avl-private.h \ 80 80 avltree/avl.h \ 81 concurrent/clib_tls.c \82 concurrent/clib.c \83 81 configs/.in/parseconfig-all.txt \ 84 82 configs/.in/parseconfig-errors.txt \ … … 89 87 io/.in/many_read.data \ 90 88 meta/fork+exec.hfa \ 91 concurrent/unified_locking/mutex_test.hfa \ 92 concurrent/channels/parallel_harness.hfa 89 concurrency/clib_tls.c \ 90 concurrency/clib.c \ 91 concurrency/unified_locking/mutex_test.hfa \ 92 concurrency/channels/parallel_harness.hfa 93 93 94 94 dist-hook: … … 109 109 #---------------------------------------------------------------------------------------------------------------- 110 110 111 # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program 111 112 all-local : # This name is important to automake and implies the default build target. 112 @+${TEST_PY} --debug=${debug} --install=${installed} --invariant --archive-errors=${archiveerrors} ${concurrent} ${timeouts} ${ARCH} --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program113 114 install : all-local # PAB only 115 116 tests : all-local 113 @+${TEST_PY} --debug=${debug} --install=${installed} --invariant ${ARCHIVE_ERRORS} ${TIMEOUT} ${GLOBAL_TIMEOUT} ${ARCH} --all 114 115 tests : all-local # synonym 116 117 install : all-local # synonym, PAB only 117 118 118 119 quick : 119 @+${TEST_PY} --debug=${debug} --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} ${ARCH} ${quick_test}120 @+${TEST_PY} --debug=${debug} --install=${installed} ${ARCHIVE_ERRORS} ${ARCH} ${quick_test} 120 121 121 122 concurrency : 122 @+${TEST_PY} --debug=${debug} --install=${installed} ${ARCH } -Iconcurrent123 @+${TEST_PY} --debug=${debug} --install=${installed} ${ARCHIVE_ERRORS} ${TIMEOUT} ${GLOBAL_TIMEOUT} ${ARCH} -Iconcurrency 123 124 124 125 list : 125 @+${TEST_PY} --list ${concurrent}126 @+${TEST_PY} --list 126 127 127 128 help : 128 129 @echo "user targets:" 129 130 @echo " Run the complete test suite." 130 @echo " $$ make (null) / tests [debug=yes/no] [installed=yes/no] [arch =${arch_support}]"131 @echo " $$ make (null) / tests [debug=yes/no] [installed=yes/no] [archive-errors=dump-dir] [timeout=seconds] [global-timeout=seconds] [arch=${arch_support}]" 131 132 @echo "" 132 133 @echo " Run the short (quick) test suite." 133 @echo " $$ make quick [debug=yes/no] [installed=yes/no] [arch =${arch_support}]"134 @echo " $$ make quick [debug=yes/no] [installed=yes/no] [archive-errors=dump-dir] [arch=${arch_support}]" 134 135 @echo "" 135 @echo " Run the concurren ttest suite."136 @echo " $$ make concurrency [debug=yes/no] [installed=yes/no] [arch =${arch_support}]"136 @echo " Run the concurrency test suite." 137 @echo " $$ make concurrency [debug=yes/no] [installed=yes/no] [archive-errors=dump-dir] [timeout=seconds] [global-timeout=seconds] [arch=${arch_support}]" 137 138 @echo "" 138 139 @echo " List all tests in the test suite." … … 204 205 205 206 SYNTAX_ONLY_CODE = expression typedefRedef variableDeclarator switch numericConstants identFuncDeclarator \ 206 init1 limits nested-types cast labelledExit array quasiKeyword include/stdincludes include/includes builtins/sync warnings/self-assignment concurren t/waitfor/parse207 init1 limits nested-types cast labelledExit array quasiKeyword include/stdincludes include/includes builtins/sync warnings/self-assignment concurrency/waitfor/parse 207 208 ${SYNTAX_ONLY_CODE} : % : %.cfa ${CFACCBIN} 208 209 ${CFACOMPILE_SYNTAX} … … 211 212 # expected failures 212 213 # use custom target since they require a custom define *and* have a name that doesn't match the file 214 215 array-ERR1 : array.cfa ${CFACCBIN} 216 ${CFACOMPILE_SYNTAX} -DERR1 217 -cp ${test} ${abspath ${@}} 218 219 array-ERR2 : array.cfa ${CFACCBIN} 220 ${CFACOMPILE_SYNTAX} -DERR2 221 -cp ${test} ${abspath ${@}} 222 223 array-ERR3 : array.cfa ${CFACCBIN} 224 ${CFACOMPILE_SYNTAX} -DERR3 225 -cp ${test} ${abspath ${@}} 226 213 227 alloc-ERROR : alloc.cfa ${CFACCBIN} 214 228 ${CFACOMPILE_SYNTAX} -DERR1 -
tests/PRNG.cfa
r2b78949 r8a930c03 1 // -*- Mode: C -*- 2 // 1 // 3 2 // Cforall Version 1.0.0 Copyright (C) 2021 University of Waterloo 4 // 5 // PRNG.c -- 6 // 3 // 4 // PRNG.c -- high-perforamnce pseudo-random numbers 5 // 6 // The contents of this file are covered under the licence agreement in the 7 // file "LICENCE" distributed with Cforall. 8 // 7 9 // Author : Peter A. Buhr 8 10 // Created On : Wed Dec 29 09:38:12 2021 9 11 // Last Modified By : Peter A. Buhr 10 // Last Modified On : Sun Apr 23 22:02:09202311 // Update Count : 42 012 // Last Modified On : Thu May 25 15:39:52 2023 13 // Update Count : 422 12 14 // 13 15 -
tests/array.cfa
r2b78949 r8a930c03 15 15 // 16 16 17 int a1[0]; 18 // int a2[*];19 // double a4[3.0];17 // Tests syntax. Comments explain semantics. Test does not show semantics. 18 // Mostly illustrates facts about C (with which CFA is being tested to agree). 19 // Is a test oracle under `gcc -x c`. 20 20 21 int m1[0][3]; 22 //int m2[*][*]; 23 int m4[3][3]; 21 #ifdef ERR1 22 #define E1(...) __VA_ARGS__ 23 #else 24 #define E1(...) 25 #endif 24 26 25 typedef int T; 27 #ifdef ERR2 28 #define E2(...) __VA_ARGS__ 29 #else 30 #define E2(...) 31 #endif 26 32 27 int fred() { 28 // int a1[]; 29 // int a2[*]; 30 int a4[3]; 31 int T[3]; 32 } 33 #ifdef ERR3 34 #define E3(...) __VA_ARGS__ 35 #else 36 #define E3(...) 37 #endif 33 38 34 int mary( int T[3], 35 int p1[const 3], 36 int p2[static 3], 37 int p3[static const 3] 38 ) { 39 } 39 int a1[0]; 40 E1( int a2[*]; ) 41 #ifndef __cforall 42 E1( double a4[3.0]; ) // BUG 275: CFA accepts but should reject 43 #endif 40 44 41 int (*tom())[3] { 42 } 45 int m1[0][3]; 46 E1( int m2[*][*]; ) 47 int m4[3][3]; 43 48 44 int (*(jane)())( int T[3], 45 int p1[const 3], 46 int p2[static 3], 47 int p3[static const 3] 48 ) { 49 } 49 typedef int T; 50 51 int fred(int n) { 52 E1( int a1[]; ) 53 E1( int a2[*]; ) 54 int a4[3]; 55 int T[3]; 56 int a5[n]; 57 } 58 59 int mary( int T[3], // same as: int *T 60 int p1[const 3], // same as: int const *p1 61 int p2[static 3], // same as T, but length >=3 checked 62 int p3[static const 3] // both above: 3 is static, p3 is const 63 ) { 64 } 65 66 // function taking (), returning pointer to array of ints 67 int (*tom())[3] { 68 } 69 70 // function taking (), returning pointer to function of same type as mary 71 int (*(jane)())( int T[3], 72 int p1[const 3], 73 int p2[static 3], 74 int p3[static const 3] 75 ) { 76 } 77 78 // functions returning same exotic pointers, in CFA's non-onion syntax 79 #ifdef __cforall 80 [ * [3] int ] toms_twin(...) { 81 } 82 [ * [int]( [3] int T, 83 [const 3] int p1, 84 [static 3] int p2, 85 [static const 3] int p3 86 ) 87 ] janes_twin(...) { 88 } 89 #endif 90 91 // GCC 11+ gives a false warning (-Wvla-parameter) on the valid (C11 ARM p134-135) combination: 92 // declare with type int[*], define with type int[n]. 93 // https://gcc.gnu.org/bugzilla//show_bug.cgi?id=100420 suggests the internal representation of 94 // of a[*] is the same as a[0]. 95 // https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wno-vla-parameter explains 96 // the purpose of -Wvla-parameter is to report conflicts between int[] and int[n], which would 97 // understandably also include those between int[42] and int[n]. 98 // https://stackoverflow.com/questions/17371645/why-use-an-asterisk-instead-of-an-integer-for-a-vla-array-parameter-of-a-f 99 // explains the declare-*, define-n pattern. 100 101 // To work around the false warning, and keep to this test's purpose of exercising CFA's 102 // handling of exotic C array syntax, what would ideally be demonstrated as a declaration of 103 // fm1, followed by its definition, is instead split into fm1x and fm1y. And similarly for 104 // fm5. 105 106 int fm1x( int, int, int[][*] ); 107 int fm1y( int r, int c, int m[][c] ) {} 108 int fm2( int r, int c, int (*m)[c] ) {} // same as fm1 109 E2( int fm3( int r, int c, int m[][static c] ) {} ) // that's not static 110 E3( int fm4( int r, int c, int m[][] ); ) // m's immediate element type is incomplete 111 int fm5x( int, int, int[*][*] ); // same as fm1 decl 112 #ifndef __cforall 113 int fm5y( int r, int c, int m[r][c] ) {} // BUG 276: CFA chokes but should accept 114 // C: same as fm1 defn 115 #endif 116 50 117 51 118 int main() { 52 #pragma GCC warning " Compiled"// force non-empty .expect file, NO TABS!!!119 #pragma GCC warning "Preprocessor started" // force non-empty .expect file, NO TABS!!! 53 120 } 54 121 -
tests/concurrency/.expect/ctor-check.txt
r2b78949 r8a930c03 1 concurren t/ctor-check.cfa:11:1 error: constructors cannot have mutex parameters1 concurrency/ctor-check.cfa:11:1 error: constructors cannot have mutex parameters 2 2 ?{}: function 3 3 ... with parameters -
tests/concurrency/actors/dynamic.cfa
r2b78949 r8a930c03 19 19 void ?{}( derived_msg & this ) { ((derived_msg &)this){ 0 }; } 20 20 21 Allocation receive( derived_actor & receiver, derived_msg & msg ) {21 allocation receive( derived_actor & receiver, derived_msg & msg ) { 22 22 if ( msg.cnt >= Times ) { 23 23 sout | "Done"; -
tests/concurrency/actors/executor.cfa
r2b78949 r8a930c03 24 24 struct d_msg { inline message; } shared_msg; 25 25 26 Allocation receive( d_actor & this, d_msg & msg ) with( this ) {26 allocation receive( d_actor & this, d_msg & msg ) with( this ) { 27 27 if ( recs == rounds ) return Finished; 28 28 if ( recs % Batch == 0 ) { -
tests/concurrency/actors/inherit.cfa
r2b78949 r8a930c03 15 15 void ^?{}( D_msg & this ) { mutex(sout) sout | 'A'; } 16 16 17 Allocation handle() {17 allocation handle() { 18 18 return Finished; 19 19 } 20 20 21 Allocation receive( Server & receiver, D_msg & msg ) { return handle(); }22 Allocation receive( Server & receiver, D_msg2 & msg ) { return handle(); }23 Allocation receive( Server2 & receiver, D_msg & msg ) { return Delete; }24 Allocation receive( Server2 & receiver, D_msg2 & msg ) { return Delete; }21 allocation receive( Server & receiver, D_msg & msg ) { return handle(); } 22 allocation receive( Server & receiver, D_msg2 & msg ) { return handle(); } 23 allocation receive( Server2 & receiver, D_msg & msg ) { return Delete; } 24 allocation receive( Server2 & receiver, D_msg2 & msg ) { return Delete; } 25 25 26 26 int main() { -
tests/concurrency/actors/matrix.cfa
r2b78949 r8a930c03 24 24 } 25 25 26 Allocation receive( derived_actor & receiver, derived_msg & msg ) {26 allocation receive( derived_actor & receiver, derived_msg & msg ) { 27 27 for ( unsigned int i = 0; i < yc; i += 1 ) { // multiply X_row by Y_col and sum products 28 28 msg.Z[i] = 0; -
tests/concurrency/actors/pingpong.cfa
r2b78949 r8a930c03 19 19 size_t times = 100000; 20 20 21 Allocation receive( ping & receiver, p_msg & msg ) {21 allocation receive( ping & receiver, p_msg & msg ) { 22 22 msg.count++; 23 23 if ( msg.count > times ) return Finished; 24 24 25 Allocation retval = Nodelete;25 allocation retval = Nodelete; 26 26 if ( msg.count == times ) retval = Finished; 27 27 *po << msg; … … 29 29 } 30 30 31 Allocation receive( pong & receiver, p_msg & msg ) {31 allocation receive( pong & receiver, p_msg & msg ) { 32 32 msg.count++; 33 33 if ( msg.count > times ) return Finished; 34 34 35 Allocation retval = Nodelete;35 allocation retval = Nodelete; 36 36 if ( msg.count == times ) retval = Finished; 37 37 *pi << msg; -
tests/concurrency/actors/poison.cfa
r2b78949 r8a930c03 18 18 Server s[10]; 19 19 for ( i; 10 ) { 20 s[i] << FinishedMsg;20 s[i] << finished_msg; 21 21 } 22 22 stop_actor_system(); … … 29 29 Server * s = alloc(); 30 30 (*s){}; 31 (*s) << DeleteMsg;31 (*s) << delete_msg; 32 32 } 33 33 stop_actor_system(); … … 39 39 Server s[10]; 40 40 for ( i; 10 ) 41 s[i] << DestroyMsg;41 s[i] << destroy_msg; 42 42 stop_actor_system(); 43 43 for ( i; 10 ) -
tests/concurrency/actors/static.cfa
r2b78949 r8a930c03 19 19 void ?{}( derived_msg & this ) { ((derived_msg &)this){ 0 }; } 20 20 21 Allocation receive( derived_actor & receiver, derived_msg & msg ) {21 allocation receive( derived_actor & receiver, derived_msg & msg ) { 22 22 if ( msg.cnt >= Times ) { 23 23 sout | "Done"; -
tests/concurrency/actors/types.cfa
r2b78949 r8a930c03 20 20 21 21 // this isn't a valid receive routine since int is not a message type 22 Allocation receive( derived_actor & receiver, int i ) with( receiver ) {22 allocation receive( derived_actor & receiver, int i ) with( receiver ) { 23 23 mutex(sout) sout | i; 24 24 counter++; … … 27 27 } 28 28 29 Allocation receive( derived_actor & receiver, d_msg & msg ) {29 allocation receive( derived_actor & receiver, d_msg & msg ) { 30 30 return receive( receiver, msg.num ); 31 31 } … … 36 36 }; 37 37 38 Allocation receive( derived_actor2 & receiver, d_msg & msg ) {38 allocation receive( derived_actor2 & receiver, d_msg & msg ) { 39 39 mutex(sout) sout | msg.num; 40 40 return Finished; … … 48 48 }; 49 49 50 Allocation receive( derived_actor3 & receiver, d_msg & msg ) {50 allocation receive( derived_actor3 & receiver, d_msg & msg ) { 51 51 mutex(sout) sout | msg.num; 52 52 if ( msg.num == -1 ) return Nodelete; … … 54 54 } 55 55 56 Allocation receive( derived_actor3 & receiver, d_msg2 & msg ) {56 allocation receive( derived_actor3 & receiver, d_msg2 & msg ) { 57 57 mutex(sout) sout | msg.num; 58 58 return Finished; -
tests/concurrency/barrier/gen_generation_expect.cfa
r2b78949 r8a930c03 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // gen_generation_expect.cfa -- simple 'script' generates the expect file for concurren t/barrier/generation7 // gen_generation_expect.cfa -- simple 'script' generates the expect file for concurrency/barrier/generation 8 8 // 9 9 // Author : Thierry Delisle -
tests/concurrency/barrier/generation.cfa
r2b78949 r8a930c03 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // concurrent/barrier/generation.cfa -- simple test that validates barriers by printing 8 // alphabetical generations 7 // generation.cfa -- simple test that validates barriers by printing alphabetical generations 9 8 // 10 9 // Author : Thierry Delisle -
tests/concurrency/barrier/last.cfa
r2b78949 r8a930c03 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // concurrent/barrier/last.cfa -- validates barrier's last hook functionality7 // last.cfa -- validates barrier's last hook functionality 8 8 // 9 9 // Author : Thierry Delisle -
tests/concurrency/barrier/order.cfa
r2b78949 r8a930c03 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // concurrent/barrier/order.cfa -- validates barriers the return value of7 // order.cfa -- validates barriers the return value of 8 8 // barrier block 9 9 // -
tests/concurrency/readyQ/barrier_sleeper.cfa
r2b78949 r8a930c03 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // concurrent/readyQ/barrier_sleeper.cfa -- testing the ready-queue7 // barrier_sleeper.cfa -- testing the ready-queue 8 8 // 9 9 // Author : Thierry Delisle -
tests/concurrency/readyQ/leader_spin.cfa
r2b78949 r8a930c03 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // concurrent/readyQ/leader_spin.cfa -- validates ready queue fairness7 // leader_spin.cfa -- validates ready queue fairness 8 8 // 9 9 // Author : Thierry Delisle -
tests/concurrency/waituntil/locks.cfa
r2b78949 r8a930c03 2 2 #include <thread.hfa> 3 3 #include <locks.hfa> 4 #include <fstream.hfa> 4 5 #include <mutex_stmt.hfa> 5 6 -
tests/configs/.expect/parseconfig.txt
r2b78949 r8a930c03 12 12 Maximum student trips: 3 13 13 14 Open_Failure thrown when config file does not exist14 open_failure thrown when config file does not exist 15 15 Failed to open the config file 16 16 -
tests/configs/parseconfig.cfa
r2b78949 r8a930c03 66 66 67 67 68 sout | " Open_Failure thrown when config file does not exist";68 sout | "open_failure thrown when config file does not exist"; 69 69 try { 70 70 parse_config( xstr(IN_DIR) "doesnt-exist.txt", entries, NUM_ENTRIES, parse_tabular_config_format ); 71 } catch( Open_Failure * ex ) {71 } catch( open_failure * ex ) { 72 72 sout | "Failed to open the config file"; 73 73 } -
tests/copyfile.cfa
r2b78949 r8a930c03 10 10 // Created On : Fri Jun 19 13:44:05 2020 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Aug 15 15:00:48 202013 // Update Count : 612 // Last Modified On : Mon Jun 5 21:20:19 2023 13 // Update Count : 7 14 14 // 15 15 … … 30 30 exit | "Usage" | argv[0] | "[ input-file (default stdin) [ output-file (default stdout) ] ]"; 31 31 } // choose 32 } catch( Open_Failure * ex ; ex->istream == &in ) {32 } catch( open_failure * ex ; ex->istream == &in ) { 33 33 exit | "Unable to open input file" | argv[1]; 34 } catch( Open_Failure * ex ; ex->ostream == &out ) {34 } catch( open_failure * ex ; ex->ostream == &out ) { 35 35 close( in ); // optional 36 36 exit | "Unable to open output file" | argv[2]; -
tests/rational.cfa
r2b78949 r8a930c03 10 10 // Created On : Mon Mar 28 08:43:12 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Jul 20 18:13:40 202113 // Update Count : 10 712 // Last Modified On : Mon Jun 5 22:58:09 2023 13 // Update Count : 108 14 14 // 15 15 … … 19 19 #include <fstream.hfa> 20 20 21 typedef Rational(int) RatInt;21 typedef rational(int) rat_int; 22 22 double convert( int i ) { return (double)i; } // used by narrow/widen 23 23 int convert( double d ) { return (int)d; } … … 25 25 int main() { 26 26 sout | "constructor"; 27 RatInt a = { 3 }, b = { 4 }, c, d = 0, e = 1;27 rat_int a = { 3 }, b = { 4 }, c, d = 0, e = 1; 28 28 sout | "a : " | a | "b : " | b | "c : " | c | "d : " | d | "e : " | e; 29 29 30 a = ( RatInt){ 4, 8 };31 b = ( RatInt){ 5, 7 };30 a = (rat_int){ 4, 8 }; 31 b = (rat_int){ 5, 7 }; 32 32 sout | "a : " | a | "b : " | b; 33 a = ( RatInt){ -2, -3 };34 b = ( RatInt){ 3, -2 };33 a = (rat_int){ -2, -3 }; 34 b = (rat_int){ 3, -2 }; 35 35 sout | "a : " | a | "b : " | b; 36 a = ( RatInt){ -2, 3 };37 b = ( RatInt){ 3, 2 };36 a = (rat_int){ -2, 3 }; 37 b = (rat_int){ 3, 2 }; 38 38 sout | "a : " | a | "b : " | b; 39 39 sout | nl; 40 40 41 41 sout | "comparison"; 42 a = ( RatInt){ -2 };43 b = ( RatInt){ -3, 2 };42 a = (rat_int){ -2 }; 43 b = (rat_int){ -3, 2 }; 44 44 sout | "a : " | a | "b : " | b; 45 sout | "a == 0 : " | a == ( Rational(int)){0}; // FIX ME46 sout | "a == 1 : " | a == ( Rational(int)){1}; // FIX ME45 sout | "a == 0 : " | a == (rational(int)){0}; // FIX ME 46 sout | "a == 1 : " | a == (rational(int)){1}; // FIX ME 47 47 sout | "a != 0 : " | a != 0; 48 48 sout | "! a : " | ! a; … … 73 73 74 74 sout | "conversion"; 75 a = ( RatInt){ 3, 4 };75 a = (rat_int){ 3, 4 }; 76 76 sout | widen( a ); 77 a = ( RatInt){ 1, 7 };77 a = (rat_int){ 1, 7 }; 78 78 sout | widen( a ); 79 a = ( RatInt){ 355, 113 };79 a = (rat_int){ 355, 113 }; 80 80 sout | widen( a ); 81 81 sout | narrow( 0.75, 4 ); … … 90 90 91 91 sout | "more tests"; 92 RatInt x = { 1, 2 }, y = { 2 };92 rat_int x = { 1, 2 }, y = { 2 }; 93 93 sout | x - y; 94 94 sout | x > y; … … 96 96 sout | y | denominator( y, -2 ) | y; 97 97 98 RatInt z = { 0, 5 };98 rat_int z = { 0, 5 }; 99 99 sout | z; 100 100 101 101 sout | x | numerator( x, 0 ) | x; 102 102 103 x = ( RatInt){ 1, MAX } + (RatInt){ 1, MAX };103 x = (rat_int){ 1, MAX } + (rat_int){ 1, MAX }; 104 104 sout | x; 105 x = ( RatInt){ 3, MAX } + (RatInt){ 2, MAX };105 x = (rat_int){ 3, MAX } + (rat_int){ 2, MAX }; 106 106 sout | x; 107 107
Note:
See TracChangeset
for help on using the changeset viewer.