- Timestamp:
- Aug 21, 2018, 2:24:29 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- 2a6292d
- Parents:
- 2b79a70 (diff), efa8b6a (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:
-
- 19 added
- 270 moved
-
.expect/KRfunctions.x64.txt (added)
-
.expect/KRfunctions.x86.txt (added)
-
.expect/abs.txt (moved) (moved from src/tests/.expect/abs.txt )
-
.expect/alloc-ERROR.txt (moved) (moved from src/tests/.expect/alloc-ERROR.txt )
-
.expect/alloc.txt (moved) (moved from src/tests/.expect/alloc.txt )
-
.expect/array.txt (moved) (moved from src/tests/.expect/array.txt )
-
.expect/ato.txt (moved) (moved from src/tests/.expect/ato.txt )
-
.expect/attributes.x64.txt (added)
-
.expect/attributes.x86.txt (added)
-
.expect/avl_test.txt (moved) (moved from src/tests/.expect/avl_test.txt )
-
.expect/cast.txt (moved) (moved from src/tests/.expect/cast.txt )
-
.expect/castError.txt (moved) (moved from src/tests/.expect/castError.txt )
-
.expect/completeTypeError.txt (moved) (moved from src/tests/.expect/completeTypeError.txt )
-
.expect/complex.txt (moved) (moved from src/tests/.expect/complex.txt )
-
.expect/counter.txt (moved) (moved from src/tests/.expect/counter.txt )
-
.expect/declarationErrors.txt (moved) (moved from src/tests/.expect/declarationErrors.txt )
-
.expect/declarationSpecifier.x64.txt (added)
-
.expect/declarationSpecifier.x86.txt (added)
-
.expect/designations.txt (moved) (moved from src/tests/.expect/designations.txt )
-
.expect/div.txt (moved) (moved from src/tests/.expect/div.txt )
-
.expect/enum.txt (moved) (moved from src/tests/.expect/enum.txt )
-
.expect/expression.txt (moved) (moved from src/tests/.expect/expression.txt )
-
.expect/extension.x64.txt (added)
-
.expect/extension.x86.txt (added)
-
.expect/fallthrough.txt (moved) (moved from src/tests/.expect/fallthrough.txt )
-
.expect/forall.txt (moved) (moved from src/tests/.expect/forall.txt )
-
.expect/forctrl.txt (added)
-
.expect/fstream_test.txt (added)
-
.expect/function-operator.txt (moved) (moved from src/tests/.expect/function-operator.txt )
-
.expect/functions.x64.txt (added)
-
.expect/functions.x86.txt (added)
-
.expect/gccExtensions.x64.txt (added)
-
.expect/gccExtensions.x86.txt (added)
-
.expect/genericUnion.txt (moved) (moved from src/tests/.expect/genericUnion.txt )
-
.expect/gmp.x64.txt (moved) (moved from src/tests/.expect/gmp.x64.txt )
-
.expect/heap.txt (moved) (moved from src/tests/.expect/heap.txt )
-
.expect/hello.txt (moved) (moved from src/tests/.expect/hello.txt )
-
.expect/identFuncDeclarator.txt (moved) (moved from src/tests/.expect/identFuncDeclarator.txt )
-
.expect/identParamDeclarator.txt (moved) (moved from src/tests/.expect/identParamDeclarator.txt )
-
.expect/identity.txt (moved) (moved from src/tests/.expect/identity.txt )
-
.expect/ifwhileCtl.txt (moved) (moved from src/tests/.expect/ifwhileCtl.txt )
-
.expect/io1.txt (moved) (moved from src/tests/.expect/io1.txt ) (1 diff)
-
.expect/io2.txt (moved) (moved from src/tests/.expect/io2.txt )
-
.expect/labelledExit.txt (moved) (moved from src/tests/.expect/labelledExit.txt )
-
.expect/limits.txt (moved) (moved from src/tests/.expect/limits.txt )
-
.expect/literals.txt (moved) (moved from src/tests/.expect/literals.txt )
-
.expect/math1.txt (moved) (moved from src/tests/.expect/math1.x64.txt ) (1 diff)
-
.expect/math2.txt (moved) (moved from src/tests/.expect/math2.x64.txt )
-
.expect/math3.txt (moved) (moved from src/tests/.expect/math3.x64.txt )
-
.expect/math4.txt (moved) (moved from src/tests/.expect/math4.x64.txt )
-
.expect/maybe.txt (moved) (moved from src/tests/.expect/maybe.txt )
-
.expect/minmax.txt (moved) (moved from src/tests/.expect/minmax.txt )
-
.expect/nested-types-ERR1.txt (moved) (moved from src/tests/.expect/nested-types-ERR1.txt )
-
.expect/nested-types-ERR2.txt (moved) (moved from src/tests/.expect/nested-types-ERR2.txt )
-
.expect/nested-types.txt (moved) (moved from src/tests/.expect/nested-types.txt )
-
.expect/numericConstants.txt (moved) (moved from src/tests/.expect/numericConstants.txt )
-
.expect/operators.txt (moved) (moved from src/tests/.expect/operators.txt )
-
.expect/polymorphism.txt (moved) (moved from src/tests/.expect/polymorphism.txt )
-
.expect/quoted_keyword.txt (moved) (moved from src/tests/.expect/quoted_keyword.txt )
-
.expect/random.txt (moved) (moved from src/tests/.expect/random.txt )
-
.expect/rational.txt (moved) (moved from src/tests/.expect/rational.txt )
-
.expect/references.txt (moved) (moved from src/tests/.expect/references.txt )
-
.expect/result.txt (moved) (moved from src/tests/.expect/result.txt )
-
.expect/scopeErrors.txt (moved) (moved from src/tests/.expect/scopeErrors.txt )
-
.expect/searchsort.txt (moved) (moved from src/tests/.expect/searchsort.txt )
-
.expect/shortCircuit.txt (moved) (moved from src/tests/.expect/shortCircuit.txt )
-
.expect/simpleGenericTriple.txt (moved) (moved from src/tests/.expect/simpleGenericTriple.txt )
-
.expect/stdincludes.txt (moved) (moved from src/tests/.expect/stdincludes.txt )
-
.expect/sum.txt (moved) (moved from src/tests/.expect/sum.txt )
-
.expect/swap.txt (moved) (moved from src/tests/.expect/swap.txt )
-
.expect/switch.txt (moved) (moved from src/tests/.expect/switch.txt )
-
.expect/time.txt (moved) (moved from src/tests/.expect/time.x64.txt ) (1 diff)
-
.expect/typedefRedef-ERR1.txt (moved) (moved from src/tests/.expect/typedefRedef-ERR1.txt )
-
.expect/typedefRedef.txt (moved) (moved from src/tests/.expect/typedefRedef.txt )
-
.expect/typeof.txt (moved) (moved from src/tests/.expect/typeof.txt )
-
.expect/user_literals.txt (moved) (moved from src/tests/.expect/user_literals.txt )
-
.expect/variableDeclarator.txt (moved) (moved from src/tests/.expect/variableDeclarator.txt )
-
.expect/vector.txt (moved) (moved from src/tests/.expect/vector.txt )
-
.expect/voidPtr.txt (moved) (moved from src/tests/.expect/voidPtr.txt )
-
.expect/with-statement.txt (moved) (moved from src/tests/.expect/with-statement.txt )
-
.gitignore (moved) (moved from src/tests/.gitignore )
-
.in/fstream_test.txt (moved) (moved from src/tests/.in/fstream_test.txt )
-
.in/gmp.txt (moved) (moved from src/tests/.in/gmp.txt )
-
.in/io.data (moved) (moved from src/tests/.in/io.data )
-
.in/rational.txt (moved) (moved from src/tests/.in/rational.txt )
-
KRfunctions.c (moved) (moved from src/tests/KRfunctions.c )
-
Makefile.am (added)
-
Makefile.in (moved) (moved from src/tests/Makefile.in ) (9 diffs)
-
abs.c (moved) (moved from src/tests/abs.c ) (2 diffs)
-
alloc.c (moved) (moved from src/tests/alloc.c ) (12 diffs)
-
array.c (moved) (moved from src/tests/array.c )
-
ato.c (moved) (moved from src/tests/ato.c ) (2 diffs)
-
attributes.c (moved) (moved from src/tests/attributes.c )
-
avltree/avl-private.c (moved) (moved from src/tests/avltree/avl-private.c )
-
avltree/avl-private.h (moved) (moved from src/tests/avltree/avl-private.h )
-
avltree/avl.h (moved) (moved from src/tests/avltree/avl.h )
-
avltree/avl0.c (moved) (moved from src/tests/avltree/avl0.c )
-
avltree/avl1.c (moved) (moved from src/tests/avltree/avl1.c ) (1 diff)
-
avltree/avl2.c (moved) (moved from src/tests/avltree/avl2.c )
-
avltree/avl3.c (moved) (moved from src/tests/avltree/avl3.c ) (1 diff)
-
avltree/avl4.c (moved) (moved from src/tests/avltree/avl4.c )
-
avltree/avl_test.c (moved) (moved from src/tests/avltree/avl_test.c ) (1 diff)
-
builtins/.expect/sync.txt (moved) (moved from src/tests/builtins/.expect/sync.txt )
-
builtins/sync.c (moved) (moved from src/tests/builtins/sync.c )
-
cast.c (moved) (moved from src/tests/cast.c )
-
castError.c (moved) (moved from src/tests/castError.c )
-
commentMisc.c (moved) (moved from src/tests/commentMisc.c )
-
completeTypeError.c (moved) (moved from src/tests/completeTypeError.c )
-
complex.c (moved) (moved from src/tests/complex.c ) (2 diffs)
-
concurrent/.expect/coroutineYield.txt (moved) (moved from src/tests/concurrent/.expect/coroutineYield.txt )
-
concurrent/.expect/monitor.txt (moved) (moved from src/tests/concurrent/.expect/monitor.txt )
-
concurrent/.expect/multi-monitor.txt (moved) (moved from src/tests/concurrent/.expect/multi-monitor.txt )
-
concurrent/.expect/preempt.txt (moved) (moved from src/tests/concurrent/.expect/preempt.txt )
-
concurrent/.expect/thread.txt (moved) (moved from src/tests/concurrent/.expect/thread.txt )
-
concurrent/coroutineYield.c (moved) (moved from src/tests/concurrent/coroutineYield.c ) (1 diff)
-
concurrent/examples/.expect/boundedBufferEXT.txt (moved) (moved from src/tests/concurrent/examples/.expect/boundedBufferEXT.txt )
-
concurrent/examples/.expect/boundedBufferINT.txt (moved) (moved from src/tests/concurrent/examples/.expect/boundedBufferINT.txt )
-
concurrent/examples/.expect/datingService.txt (moved) (moved from src/tests/concurrent/examples/.expect/datingService.txt )
-
concurrent/examples/.expect/matrixSum.txt (moved) (moved from src/tests/concurrent/examples/.expect/matrixSum.txt )
-
concurrent/examples/.expect/quickSort.txt (moved) (moved from src/tests/concurrent/examples/.expect/quickSort.txt )
-
concurrent/examples/.in/quickSort.txt (moved) (moved from src/tests/concurrent/examples/.in/quickSort.txt )
-
concurrent/examples/boundedBufferEXT.c (moved) (moved from src/tests/concurrent/examples/boundedBufferEXT.c ) (2 diffs)
-
concurrent/examples/boundedBufferINT.c (moved) (moved from src/tests/concurrent/examples/boundedBufferINT.c ) (2 diffs)
-
concurrent/examples/datingService.c (moved) (moved from src/tests/concurrent/examples/datingService.c ) (1 diff)
-
concurrent/examples/matrixSum.c (moved) (moved from src/tests/concurrent/examples/matrixSum.c ) (3 diffs)
-
concurrent/examples/quickSort.c (moved) (moved from src/tests/concurrent/examples/quickSort.c ) (2 diffs)
-
concurrent/monitor.c (moved) (moved from src/tests/concurrent/monitor.c ) (1 diff)
-
concurrent/multi-monitor.c (moved) (moved from src/tests/concurrent/multi-monitor.c ) (1 diff)
-
concurrent/preempt.c (moved) (moved from src/tests/concurrent/preempt.c ) (1 diff)
-
concurrent/signal/.expect/block.txt (moved) (moved from src/tests/concurrent/signal/.expect/block.txt )
-
concurrent/signal/.expect/disjoint.txt (moved) (moved from src/tests/concurrent/signal/.expect/disjoint.txt )
-
concurrent/signal/.expect/wait.txt (moved) (moved from src/tests/concurrent/signal/.expect/wait.txt )
-
concurrent/signal/block.c (moved) (moved from src/tests/concurrent/signal/block.c ) (1 diff)
-
concurrent/signal/disjoint.c (moved) (moved from src/tests/concurrent/signal/disjoint.c ) (1 diff)
-
concurrent/signal/wait.c (moved) (moved from src/tests/concurrent/signal/wait.c ) (1 diff)
-
concurrent/thread.c (moved) (moved from src/tests/concurrent/thread.c ) (1 diff)
-
concurrent/waitfor/.expect/barge.txt (moved) (moved from src/tests/concurrent/waitfor/.expect/barge.txt )
-
concurrent/waitfor/.expect/dtor.txt (moved) (moved from src/tests/concurrent/waitfor/.expect/dtor.txt )
-
concurrent/waitfor/.expect/else.txt (moved) (moved from src/tests/concurrent/waitfor/.expect/else.txt )
-
concurrent/waitfor/.expect/recurse.txt (moved) (moved from src/tests/concurrent/waitfor/.expect/recurse.txt )
-
concurrent/waitfor/.expect/statment.txt (moved) (moved from src/tests/concurrent/waitfor/.expect/statment.txt )
-
concurrent/waitfor/.expect/when.txt (moved) (moved from src/tests/concurrent/waitfor/.expect/when.txt )
-
concurrent/waitfor/barge.c (moved) (moved from src/tests/concurrent/waitfor/barge.c ) (1 diff)
-
concurrent/waitfor/dtor.c (moved) (moved from src/tests/concurrent/waitfor/dtor.c ) (1 diff)
-
concurrent/waitfor/else.c (moved) (moved from src/tests/concurrent/waitfor/else.c ) (1 diff)
-
concurrent/waitfor/parse.c (moved) (moved from src/tests/concurrent/waitfor/parse.c ) (1 diff)
-
concurrent/waitfor/parse2.c (moved) (moved from src/tests/concurrent/waitfor/parse2.c )
-
concurrent/waitfor/recurse.c (moved) (moved from src/tests/concurrent/waitfor/recurse.c ) (1 diff)
-
concurrent/waitfor/simple.c (moved) (moved from src/tests/concurrent/waitfor/simple.c ) (1 diff)
-
concurrent/waitfor/statment.c (moved) (moved from src/tests/concurrent/waitfor/statment.c ) (1 diff)
-
concurrent/waitfor/when.c (moved) (moved from src/tests/concurrent/waitfor/when.c ) (1 diff)
-
config.py.in (moved) (moved from src/tests/config.py.in ) (1 diff)
-
context.c (moved) (moved from src/tests/context.c )
-
coroutine/.expect/fibonacci.txt (moved) (moved from src/tests/coroutine/.expect/fibonacci.txt )
-
coroutine/.expect/fmtLines.txt (added)
-
coroutine/.expect/pingpong.txt (moved) (moved from src/tests/coroutine/.expect/pingpong.txt )
-
coroutine/.expect/prodcons.txt (moved) (moved from src/tests/coroutine/.expect/prodcons.txt )
-
coroutine/.expect/runningTotal.txt (moved) (moved from src/tests/coroutine/.expect/runningTotal.txt )
-
coroutine/.in/fmtLines.txt (moved) (moved from src/tests/coroutine/.in/fmtLines.txt ) (2 diffs)
-
coroutine/fibonacci.c (moved) (moved from src/tests/coroutine/fibonacci.c ) (3 diffs)
-
coroutine/fibonacci_1.c (added)
-
coroutine/fmtLines.c (moved) (moved from src/tests/coroutine/fmtLines.c ) (3 diffs)
-
coroutine/pingpong.c (moved) (moved from src/tests/coroutine/pingpong.c ) (2 diffs)
-
coroutine/prodcons.c (moved) (moved from src/tests/coroutine/prodcons.c ) (2 diffs)
-
coroutine/runningTotal.c (moved) (moved from src/tests/coroutine/runningTotal.c ) (3 diffs)
-
counter.c (moved) (moved from src/tests/counter.c )
-
declarationErrors.c (moved) (moved from src/tests/declarationErrors.c )
-
declarationSpecifier.c (moved) (moved from src/tests/declarationSpecifier.c )
-
designations.c (moved) (moved from src/tests/designations.c )
-
div.c (moved) (moved from src/tests/div.c ) (2 diffs)
-
enum.c (moved) (moved from src/tests/enum.c )
-
except-0.c (moved) (moved from src/tests/except-0.c )
-
except-1.c (moved) (moved from src/tests/except-1.c )
-
except-2.c (moved) (moved from src/tests/except-2.c ) (1 diff)
-
except-3.c (moved) (moved from src/tests/except-3.c )
-
except-mac.h (moved) (moved from src/tests/except-mac.h )
-
expression.c (moved) (moved from src/tests/expression.c )
-
extension.c (moved) (moved from src/tests/extension.c )
-
fallthrough.c (moved) (moved from src/tests/fallthrough.c ) (2 diffs)
-
forall.c (moved) (moved from src/tests/forall.c )
-
forctrl.c (added)
-
fstream_test.c (moved) (moved from src/tests/fstream_test.c ) (2 diffs)
-
function-operator.c (moved) (moved from src/tests/function-operator.c ) (3 diffs)
-
functions.c (moved) (moved from src/tests/functions.c )
-
gccExtensions.c (moved) (moved from src/tests/gccExtensions.c )
-
genericUnion.c (moved) (moved from src/tests/genericUnion.c ) (1 diff)
-
gmp.c (moved) (moved from src/tests/gmp.c ) (3 diffs)
-
heap.c (moved) (moved from src/tests/heap.c ) (1 diff)
-
hello.c (moved) (moved from src/tests/hello.c ) (2 diffs)
-
identFuncDeclarator.c (moved) (moved from src/tests/identFuncDeclarator.c )
-
identParamDeclarator.c (moved) (moved from src/tests/identParamDeclarator.c )
-
identity.c (moved) (moved from src/tests/identity.c ) (2 diffs)
-
ifwhileCtl.c (moved) (moved from src/tests/ifwhileCtl.c ) (1 diff)
-
io1.c (moved) (moved from src/tests/io1.c ) (2 diffs)
-
io2.c (moved) (moved from src/tests/io2.c ) (1 diff)
-
labelledExit.c (moved) (moved from src/tests/labelledExit.c ) (6 diffs)
-
limits.c (moved) (moved from src/tests/limits.c ) (1 diff)
-
literals.c (moved) (moved from src/tests/literals.c ) (3 diffs)
-
long_tests.h (moved) (moved from src/tests/long_tests.h )
-
math1.c (moved) (moved from src/tests/math1.c ) (3 diffs)
-
math2.c (moved) (moved from src/tests/math2.c ) (2 diffs)
-
math3.c (moved) (moved from src/tests/math3.c ) (2 diffs)
-
math4.c (moved) (moved from src/tests/math4.c ) (2 diffs)
-
maybe.c (moved) (moved from src/tests/maybe.c ) (1 diff)
-
minmax.c (moved) (moved from src/tests/minmax.c ) (2 diffs)
-
namedParmArg.c (moved) (moved from src/tests/namedParmArg.c )
-
nested-types.c (moved) (moved from src/tests/nested-types.c )
-
numericConstants.c (moved) (moved from src/tests/numericConstants.c )
-
occursError.c (moved) (moved from src/tests/occursError.c )
-
operators.c (moved) (moved from src/tests/operators.c )
-
polymorphism.c (moved) (moved from src/tests/polymorphism.c )
-
preempt_longrun/Makefile.am (moved) (moved from src/tests/preempt_longrun/Makefile.am ) (1 diff)
-
preempt_longrun/Makefile.in (moved) (moved from src/tests/preempt_longrun/Makefile.in ) (7 diffs)
-
preempt_longrun/block.c (moved) (moved from src/tests/preempt_longrun/block.c )
-
preempt_longrun/coroutine.c (moved) (moved from src/tests/preempt_longrun/coroutine.c )
-
preempt_longrun/create.c (moved) (moved from src/tests/preempt_longrun/create.c ) (1 diff)
-
preempt_longrun/disjoint.c (moved) (moved from src/tests/preempt_longrun/disjoint.c )
-
preempt_longrun/enter.c (moved) (moved from src/tests/preempt_longrun/enter.c ) (1 diff)
-
preempt_longrun/enter3.c (moved) (moved from src/tests/preempt_longrun/enter3.c ) (1 diff)
-
preempt_longrun/preempt.c (moved) (moved from src/tests/preempt_longrun/preempt.c )
-
preempt_longrun/processor.c (moved) (moved from src/tests/preempt_longrun/processor.c ) (1 diff)
-
preempt_longrun/stack.c (moved) (moved from src/tests/preempt_longrun/stack.c ) (1 diff)
-
preempt_longrun/update-type (moved) (moved from src/tests/preempt_longrun/update-type )
-
preempt_longrun/wait.c (moved) (moved from src/tests/preempt_longrun/wait.c )
-
preempt_longrun/yield.c (moved) (moved from src/tests/preempt_longrun/yield.c ) (1 diff)
-
pybin/__init__.py (moved) (moved from src/tests/pybin/__init__.py )
-
pybin/settings.py (added)
-
pybin/test_run.py (moved) (moved from src/tests/pybin/test_run.py )
-
pybin/tools.py (moved) (moved from src/tests/pybin/tools.py ) (5 diffs)
-
quoted_keyword.c (moved) (moved from src/tests/quoted_keyword.c ) (1 diff)
-
raii/.expect/ctor-autogen-ERR1.txt (moved) (moved from src/tests/raii/.expect/ctor-autogen-ERR1.txt )
-
raii/.expect/ctor-autogen.txt (moved) (moved from src/tests/raii/.expect/ctor-autogen.txt )
-
raii/.expect/dtor-early-exit-ERR1.txt (moved) (moved from src/tests/raii/.expect/dtor-early-exit-ERR1.txt ) (1 diff)
-
raii/.expect/dtor-early-exit-ERR2.txt (moved) (moved from src/tests/raii/.expect/dtor-early-exit-ERR2.txt ) (1 diff)
-
raii/.expect/dtor-early-exit.txt (moved) (moved from src/tests/raii/.expect/dtor-early-exit.txt )
-
raii/.expect/globals.txt (moved) (moved from src/tests/raii/.expect/globals.txt )
-
raii/.expect/init_once.txt (moved) (moved from src/tests/raii/.expect/init_once.txt )
-
raii/.expect/memberCtors-ERR1.txt (moved) (moved from src/tests/raii/.expect/memberCtors-ERR1.txt )
-
raii/.expect/memberCtors.txt (moved) (moved from src/tests/raii/.expect/memberCtors.txt )
-
raii/ctor-autogen.c (moved) (moved from src/tests/raii/ctor-autogen.c )
-
raii/dtor-early-exit.c (moved) (moved from src/tests/raii/dtor-early-exit.c ) (1 diff)
-
raii/globals.c (moved) (moved from src/tests/raii/globals.c ) (1 diff)
-
raii/init_once.c (moved) (moved from src/tests/raii/init_once.c )
-
raii/memberCtors.c (moved) (moved from src/tests/raii/memberCtors.c )
-
raii/multiDimension.c (moved) (moved from src/tests/raii/multiDimension.c )
-
raii/multiDimension.txt (moved) (moved from src/tests/raii/multiDimension.txt )
-
random.c (moved) (moved from src/tests/random.c ) (2 diffs)
-
rational.c (moved) (moved from src/tests/rational.c ) (1 diff)
-
references.c (moved) (moved from src/tests/references.c )
-
result.c (moved) (moved from src/tests/result.c ) (1 diff)
-
scope.c (moved) (moved from src/tests/scope.c )
-
scopeErrors.c (moved) (moved from src/tests/scopeErrors.c )
-
searchsort.c (moved) (moved from src/tests/searchsort.c ) (12 diffs)
-
shortCircuit.c (moved) (moved from src/tests/shortCircuit.c ) (1 diff)
-
simpleGenericTriple.c (moved) (moved from src/tests/simpleGenericTriple.c )
-
stdincludes.c (moved) (moved from src/tests/stdincludes.c )
-
structMember.c (moved) (moved from src/tests/structMember.c )
-
subrange.c (moved) (moved from src/tests/subrange.c )
-
sum.c (moved) (moved from src/tests/sum.c ) (2 diffs)
-
swap.c (moved) (moved from src/tests/swap.c ) (2 diffs)
-
switch.c (moved) (moved from src/tests/switch.c )
-
test.py (moved) (moved from src/tests/test.py ) (8 diffs)
-
time.c (moved) (moved from src/tests/time.c ) (2 diffs)
-
tuple/.expect/tupleAssign.txt (moved) (moved from src/tests/tuple/.expect/tupleAssign.txt )
-
tuple/.expect/tupleCast.txt (moved) (moved from src/tests/tuple/.expect/tupleCast.txt )
-
tuple/.expect/tupleFunction.txt (moved) (moved from src/tests/tuple/.expect/tupleFunction.txt )
-
tuple/.expect/tupleMember.txt (moved) (moved from src/tests/tuple/.expect/tupleMember.txt )
-
tuple/.expect/tuplePolymorphism.txt (moved) (moved from src/tests/tuple/.expect/tuplePolymorphism.txt )
-
tuple/.expect/tupleVariadic.txt (moved) (moved from src/tests/tuple/.expect/tupleVariadic.txt )
-
tuple/tupleAssign.c (moved) (moved from src/tests/tuple/tupleAssign.c ) (1 diff)
-
tuple/tupleCast.c (moved) (moved from src/tests/tuple/tupleCast.c )
-
tuple/tupleFunction.c (moved) (moved from src/tests/tuple/tupleFunction.c )
-
tuple/tupleMember.c (moved) (moved from src/tests/tuple/tupleMember.c )
-
tuple/tuplePolymorphism.c (moved) (moved from src/tests/tuple/tuplePolymorphism.c )
-
tuple/tupleVariadic.c (moved) (moved from src/tests/tuple/tupleVariadic.c ) (5 diffs)
-
tuple/tuples.c (moved) (moved from src/tests/tuple/tuples.c )
-
typeGenerator.c (moved) (moved from src/tests/typeGenerator.c )
-
typedef.c (moved) (moved from src/tests/typedef.c )
-
typedefDeclarator.c (moved) (moved from src/tests/typedefDeclarator.c )
-
typedefRedef.c (moved) (moved from src/tests/typedefRedef.c )
-
typeof.c (moved) (moved from src/tests/typeof.c )
-
user_literals.c (moved) (moved from src/tests/user_literals.c ) (2 diffs)
-
variableDeclarator.c (moved) (moved from src/tests/variableDeclarator.c )
-
vector.c (moved) (moved from src/tests/vector.c ) (1 diff)
-
virtualCast.c (moved) (moved from src/tests/virtualCast.c ) (1 diff)
-
voidPtr.c (moved) (moved from src/tests/voidPtr.c )
-
warnings/.expect/self-assignment.txt (moved) (moved from src/tests/warnings/.expect/self-assignment.txt )
-
warnings/self-assignment.c (moved) (moved from src/tests/warnings/self-assignment.c )
-
with-statement.c (moved) (moved from src/tests/with-statement.c )
Legend:
- Unmodified
- Added
- Removed
-
tests/.expect/io1.txt
r2b79a70 rcdbab55 8 8 9 9 closing delimiters 10 1, x 2. x 3; x 4! x 5? x 6% x 7 ¢ x 8» x 9) x 10] x 11} x10 1, x 2. x 3; x 4! x 5? x 6% x 7 ¢ x 8 » x 9) x 10] x 11} x 11 11 12 12 opening/closing delimiters -
tests/.expect/math1.txt
r2b79a70 rcdbab55 9 9 exp2:2 2 2 10 10 expm1:1.71828 1.71828182845905 1.71828182845904524 11 pow:1 1 1 0.273957+0.583701i 0.273957253830121+0.583700758758615i 0.273957253830121071+0.583700758758614627i11 pow:1 1 1 0.273957+0.583701i 0.273957253830121+0.583700758758615i -0.638110484918098871+0.705394566961838155i 12 12 \ 16 256 13 13 \ 912673 256 64 -64 0.015625 -0.015625 18.3791736799526 0.264715-1.1922i -
tests/.expect/time.txt
r2b79a70 rcdbab55 1 10800 2 3. 0712 1.000012 0 2 3. 071 10800 2 3.375 12 1.00001 2 0 2 3.375 3 3 7 7 7 4 4 14 -
tests/Makefile.in
r2b79a70 rcdbab55 91 91 build_triplet = @build@ 92 92 host_triplet = @host@ 93 @BUILD_DEBUG_FALSE@am__append_1 = -nodebug94 @BUILD_DEBUG_TRUE@@BUILD_RELEASE_FALSE@am__append_2 = -debug95 @BUILD_DEBUG_TRUE@@BUILD_RELEASE_TRUE@am__append_3 = ${DEBUG_FLAGS}96 93 EXTRA_PROGRAMS = fstream_test$(EXEEXT) avl_test$(EXEEXT) 97 subdir = src/tests94 subdir = tests 98 95 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 99 am__aclocal_m4_deps = $(top_srcdir)/configure.ac 96 am__aclocal_m4_deps = $(top_srcdir)/automake/cfa.m4 \ 97 $(top_srcdir)/configure.ac 100 98 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 101 99 $(ACLOCAL_M4) … … 182 180 BACKEND_CC = @BACKEND_CC@ 183 181 BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@ 184 BUILD_IN_TREE_FLAGS_NOLIB = @BUILD_IN_TREE_FLAGS_NOLIB@185 182 CC = @CFACC@ 186 183 CCAS = @CCAS@ … … 213 210 EXEEXT = @EXEEXT@ 214 211 GREP = @GREP@ 212 HOST_FLAGS = @HOST_FLAGS@ 215 213 INSTALL = @INSTALL@ 216 214 INSTALL_DATA = @INSTALL_DATA@ … … 222 220 LEXLIB = @LEXLIB@ 223 221 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ 222 LIBCFA_TARGET_DIRS = @LIBCFA_TARGET_DIRS@ 223 LIBCFA_TARGET_MAKEFILES = @LIBCFA_TARGET_MAKEFILES@ 224 224 LIBOBJS = @LIBOBJS@ 225 225 LIBS = @LIBS@ 226 226 LTLIBOBJS = @LTLIBOBJS@ 227 MACHINE_TYPE = @MACHINE_TYPE@228 227 MAKEINFO = @MAKEINFO@ 229 228 MKDIR_P = @MKDIR_P@ … … 241 240 SHELL = @SHELL@ 242 241 STRIP = @STRIP@ 242 TARGET_HOSTS = @TARGET_HOSTS@ 243 243 VERSION = @VERSION@ 244 244 YACC = @YACC@ … … 296 296 top_builddir = @top_builddir@ 297 297 top_srcdir = @top_srcdir@ 298 AUTOMAKE_OPTIONS = foreign # do not require all the GNU file names 298 299 debug = yes 300 installed = no 299 301 quick_test = avl_test operators numericConstants expression enum array typeof cast raii/dtor-early-exit raii/init_once attributes 300 @BUILD_CONCURRENCY_FALSE@concurrent = '-Econcurrent' 301 @BUILD_CONCURRENCY_TRUE@concurrent = 302 TEST_PY = python ${srcdir}/test.py 302 concurrent = 303 TEST_PY = python ${builddir}/test.py 303 304 304 305 # applies to both programs 305 306 AM_CFLAGS = $(if $(test), 2> $(test), ) -g -Wall -Wno-unused-function \ 306 -quiet @CFA_FLAGS@ -DIN_DIR="${srcdir}/.in/" \307 @BUILD_IN_TREE_FLAGS@ $(am__append_1) $(am__append_2) \308 $(am__append_3) 307 -quiet @CFA_FLAGS@ -DIN_DIR="${srcdir}/.in/" ${DEBUG_FLAGS} \ 308 ${INSTALL_FLAGS} ${ARCH_FLAGS} 309 PRETTY_PATH = cd ${srcdir} && 309 310 fstream_test_SOURCES = fstream_test.c 310 311 avl_test_SOURCES = avltree/avl_test.c avltree/avl0.c avltree/avl1.c avltree/avl2.c avltree/avl3.c avltree/avl4.c avltree/avl-private.c 311 312 # SKULLDUGGERY like libcfa/Makefile.am prevent extensionless headers from being generated313 # however, here it is more complicated because it must match the dependencies based on how314 # they are generated by gcc315 headers = $(shell find $(top_srcdir)/src/libcfa -type f ! -name "*.*")316 headers_real = $(shell realpath --relative-to=$(top_srcdir)/src/libcfa $(headers))317 headers_deps = $(addprefix %/, $(headers_real))318 312 all: all-am 319 313 320 314 .SUFFIXES: 321 .SUFFIXES: .c .o .obj 315 .SUFFIXES: .c .o .obj .validate 322 316 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) 323 317 @for dep in $?; do \ … … 329 323 esac; \ 330 324 done; \ 331 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/tests/Makefile'; \325 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/Makefile'; \ 332 326 $(am__cd) $(top_srcdir) && \ 333 $(AUTOMAKE) --foreign src/tests/Makefile327 $(AUTOMAKE) --foreign tests/Makefile 334 328 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 335 329 @case '$?' in \ … … 617 611 618 612 619 .PHONY : list 620 613 .PHONY: list .validate 614 .INTERMEDIATE: .validate .validate.c 615 616 #---------------------------------------------------------------------------------------------------------------- 621 617 all-local : 622 @+${TEST_PY} --debug=${debug} ${concurrent} ${quick_test}618 @+${TEST_PY} --debug=${debug} --install=${installed} ${concurrent} ${quick_test} 623 619 624 620 all-tests : 625 @+${TEST_PY} --all --debug=${debug} ${concurrent} # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program621 @+${TEST_PY} --all --debug=${debug} --install=${installed} ${concurrent} # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program 626 622 627 623 clean-local : … … 631 627 @+${TEST_PY} --list ${concurrent} 632 628 629 .validate: .validate.c 630 $(COMPILE) .validate.c -fsyntax-only -Wall -Wextra -Werror 631 632 .validate.c: 633 @echo "int main() { return 0; }" > ${@} 634 633 635 concurrency : 634 @+${TEST_PY} --debug=${debug} -Iconcurrent 635 $(headers_deps) : 636 echo "Dummy rule, should never be called" 637 638 # %/stdlib: 639 # echo "Dummy rule, should never be called" 640 636 @+${TEST_PY} --debug=${debug} --install=${installed} -Iconcurrent 637 638 #---------------------------------------------------------------------------------------------------------------- 641 639 # implicit rule so not all test require a rule 642 640 % : %.c $(CC) 643 $( COMPILE) $(abspath ${<}) -o ${@}641 $(PRETTY_PATH) $(COMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 644 642 645 643 declarationSpecifier: declarationSpecifier.c $(CC) 646 $( COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@}644 $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 647 645 648 646 gccExtensions : gccExtensions.c $(CC) 649 $( COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@}647 $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 650 648 651 649 extension : extension.c $(CC) 652 $( COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@}650 $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 653 651 654 652 attributes : attributes.c $(CC) 655 $( COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@}653 $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 656 654 657 655 functions: functions.c $(CC) 658 $( COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@}656 $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 659 657 660 658 KRfunctions : KRfunctions.c $(CC) 661 $( COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@}659 $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 662 660 663 661 sched-ext-parse : sched-ext-parse.c $(CC) 664 $( COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@}662 $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 665 663 666 664 gmp : gmp.c $(CC) 667 $(COMPILE) -lgmp $(abspath ${<}) -o ${@} 668 665 $(PRETTY_PATH) $(COMPILE) -lgmp $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 666 667 #builtins 668 builtins/sync: builtins/sync.c $(CC) 669 $(PRETTY_PATH) $(COMPILE) $(shell realpath --relative-to=${srcdir} ${<}) 2> $(abspath ${@}) -fsyntax-only 670 671 #------------------------------------------------------------------------------ 672 #To make errors path independent we need to cd into the correct directories 669 673 completeTypeError : completeTypeError.c $(CC) 670 $( COMPILE) -DERR1 $(abspath ${<}) -o ${@}674 $(PRETTY_PATH) $(COMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 671 675 672 676 typedefRedef-ERR1: typedefRedef.c $(CC) 673 $( COMPILE) -DERR1 $(abspath ${<}) -o ${@}677 $(PRETTY_PATH) $(COMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 674 678 675 679 alloc-ERROR: alloc.c $(CC) 676 $( COMPILE) -DERR1 $(abspath ${<}) -o ${@}680 $(PRETTY_PATH) $(COMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 677 681 678 682 fallthrough-ERROR: fallthrough.c $(CC) 679 $( COMPILE) -DERR1 $(abspath ${<}) -o ${@}683 $(PRETTY_PATH) $(COMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 680 684 681 685 nested-types-ERR1: nested-types.c $(CC) 682 $( COMPILE) -DERR1 $(abspath ${<}) -o ${@}686 $(PRETTY_PATH) $(COMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 683 687 684 688 nested-types-ERR2: nested-types.c $(CC) 685 $( COMPILE) -DERR2 $(abspath ${<}) -o ${@}689 $(PRETTY_PATH) $(COMPILE) -DERR2 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 686 690 687 691 # Constructor/destructor tests 688 692 raii/dtor-early-exit-ERR1: raii/dtor-early-exit.c $(CC) 689 $( COMPILE) -DERR1 $(abspath ${<}) -o ${@}693 $(PRETTY_PATH) $(COMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 690 694 691 695 raii/dtor-early-exit-ERR2: raii/dtor-early-exit.c $(CC) 692 $( COMPILE) -DERR2 $(abspath ${<}) -o ${@}696 $(PRETTY_PATH) $(COMPILE) -DERR2 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 693 697 694 698 raii/memberCtors-ERR1: raii/memberCtors.c $(CC) 695 $( COMPILE) -DERR1 $(abspath ${<}) -o ${@}699 $(PRETTY_PATH) $(COMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 696 700 697 701 raii/ctor-autogen-ERR1: raii/ctor-autogen.c $(CC) 698 $( COMPILE) -DERR1 $(abspath ${<}) -o ${@}702 $(PRETTY_PATH) $(COMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 699 703 700 704 # Warnings 701 705 warnings/self-assignment: warnings/self-assignment.c $(CC) 702 $(COMPILE) $(abspath ${<}) 2> ${@} -fsyntax-only 703 704 #builtins 705 builtins/sync: builtins/sync.c $(CC) 706 $(COMPILE) $(abspath ${<}) 2> ${@} -fsyntax-only 706 $(PRETTY_PATH) $(COMPILE) $(shell realpath --relative-to=${srcdir} ${<}) 2> $(abspath ${@}) -fsyntax-only 707 707 708 708 # Tell versions [3.59,3.63) of GNU make to not export all variables. -
tests/abs.c
r2b79a70 rcdbab55 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // abs.c -- 7 // abs.c -- 8 8 // 9 9 // Author : Peter A. Buhr … … 14 14 // 15 15 16 #include <fstream >17 #include <stdlib > // abs16 #include <fstream.hfa> 17 #include <stdlib.hfa> // abs 18 18 19 19 int main( void ) { -
tests/alloc.c
r2b79a70 rcdbab55 10 10 // Created On : Wed Feb 3 07:56:22 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jul 26 20:58:05 201813 // Update Count : 33 412 // Last Modified On : Thu Aug 9 06:21:35 2018 13 // Update Count : 337 14 14 // 15 15 … … 18 18 #include <stdint.h> // uintptr_t 19 19 #include <stdlib.h> // posix_memalign 20 #include <fstream >21 #include <stdlib > // access C malloc, realloc20 #include <fstream.hfa> 21 #include <stdlib.hfa> // access C malloc, realloc 22 22 23 23 int * foo( int * p, int c ) { return p; } … … 62 62 p = (int *)calloc( dim, sizeof( *p ) ); // C array calloc, type unsafe 63 63 printf( "C array calloc, fill 0\n" ); 64 for ( i nt i = 0; i < dim; i += 1) { printf( "%#x ", p[i] ); }64 for ( i; dim ) { printf( "%#x ", p[i] ); } 65 65 printf( "\n" ); 66 66 free( p ); … … 68 68 p = calloc( dim ); // CFA array calloc, type safe 69 69 printf( "CFA array calloc, fill 0\n" ); 70 for ( i nt i = 0; i < dim; i += 1) { printf( "%#x ", p[i] ); }70 for ( i; dim ) { printf( "%#x ", p[i] ); } 71 71 printf( "\n" ); 72 72 free( p ); 73 73 74 74 p = alloc( dim ); // CFA array alloc, type safe 75 for ( i nt i = 0; i < dim; i += 1) { p[i] = 0xdeadbeef; }75 for ( i; dim ) { p[i] = 0xdeadbeef; } 76 76 printf( "CFA array alloc, no fill\n" ); 77 for ( i nt i = 0; i < dim; i += 1) { printf( "%#x ", p[i] ); }77 for ( i; dim ) { printf( "%#x ", p[i] ); } 78 78 printf( "\n" ); 79 79 free( p ); … … 81 81 p = alloc( 2 * dim, fill ); // CFA array alloc, fill 82 82 printf( "CFA array alloc, fill %#hhx\n", fill ); 83 for ( i nt i = 0; i < 2 * dim; i += 1) { printf( "%#x ", p[i] ); }83 for ( i; 2 * dim ) { printf( "%#x ", p[i] ); } 84 84 printf( "\n" ); 85 85 // do not free … … 90 90 91 91 p = (int *)realloc( p, dim * sizeof(*p) ); // C realloc 92 for ( i nt i = 0; i < dim; i += 1) { p[i] = 0xdeadbeef; }92 for ( i; dim ) { p[i] = 0xdeadbeef; } 93 93 printf( "C realloc\n" ); 94 for ( i nt i = 0; i < dim; i += 1) { printf( "%#x ", p[i] ); }94 for ( i; dim ) { printf( "%#x ", p[i] ); } 95 95 printf( "\n" ); 96 96 97 97 p = realloc( p, 2 * dim * sizeof(*p) ); // CFA realloc 98 for ( i nt i = dim; i < 2 * dim; i += 1) { p[i] = 0x1010101; }98 for ( i; dim ~ 2 * dim ) { p[i] = 0x1010101; } 99 99 printf( "CFA realloc\n" ); 100 for ( i nt i = 0; i < 2 * dim; i += 1) { printf( "%#x ", p[i] ); }100 for ( i; 2 * dim ) { printf( "%#x ", p[i] ); } 101 101 printf( "\n" ); 102 102 // do not free … … 107 107 108 108 p = alloc( p, dim ); // CFA resize array alloc 109 for ( i nt i = 0; i < dim; i += 1) { p[i] = 0xdeadbeef; }109 for ( i; dim ) { p[i] = 0xdeadbeef; } 110 110 printf( "CFA resize alloc\n" ); 111 for ( i nt i = 0; i < dim; i += 1) { printf( "%#x ", p[i] ); }111 for ( i; dim ) { printf( "%#x ", p[i] ); } 112 112 printf( "\n" ); 113 113 114 114 p = alloc( p, 2 * dim ); // CFA resize array alloc 115 for ( i nt i = dim; i < 2 * dim; i += 1) { p[i] = 0x1010101; }115 for ( i; dim ~ 2 * dim ) { p[i] = 0x1010101; } 116 116 printf( "CFA resize array alloc\n" ); 117 for ( i nt i = 0; i < 2 * dim; i += 1) { printf( "%#x ", p[i] ); }117 for ( i; 2 * dim ) { printf( "%#x ", p[i] ); } 118 118 printf( "\n" ); 119 119 120 120 p = alloc( p, dim ); // CFA array alloc 121 121 printf( "CFA resize array alloc\n" ); 122 for ( i nt i = 0; i < dim; i += 1) { printf( "%#x ", p[i] ); }122 for ( i; dim ) { printf( "%#x ", p[i] ); } 123 123 printf( "\n" ); 124 124 … … 128 128 p = alloc( p, dim, fill ); // CFA array alloc, fill 129 129 printf( "CFA resize array alloc, fill\n" ); 130 for ( i nt i = 0; i < dim; i += 1) { printf( "%#x ", p[i] ); }130 for ( i; dim ) { printf( "%#x ", p[i] ); } 131 131 printf( "\n" ); 132 132 133 133 p = alloc( p, 2 * dim, fill ); // CFA array alloc, fill 134 134 printf( "CFA resize array alloc, fill\n" ); 135 for ( i nt i = 0; i < 2 * dim; i += 1) { printf( "%#x ", p[i] ); }135 for ( i; 2 * dim ) { printf( "%#x ", p[i] ); } 136 136 printf( "\n" ); 137 137 138 138 p = alloc( p, dim, fill ); // CFA array alloc, fill 139 139 printf( "CFA resize array alloc, fill\n" ); 140 for ( i nt i = 0; i < dim; i += 1) { printf( "%#x ", p[i] );; }140 for ( i; dim ) { printf( "%#x ", p[i] );; } 141 141 printf( "\n" ); 142 142 free( p ); … … 193 193 stp = align_alloc( Alignment, dim ); // CFA array memalign 194 194 assert( (uintptr_t)stp % Alignment == 0 ); 195 for ( i nt i = 0; i < dim; i += 1) { stp[i] = (Struct){ 42, 42.5 }; }195 for ( i; dim ) { stp[i] = (Struct){ 42, 42.5 }; } 196 196 printf( "CFA array align_alloc\n" ); 197 for ( i nt i = 0; i < dim; i += 1) { printf( "%d %g, ", stp[i].x, stp[i].y ); }197 for ( i; dim ) { printf( "%d %g, ", stp[i].x, stp[i].y ); } 198 198 printf( "\n" ); 199 199 free( stp ); … … 202 202 assert( (uintptr_t)stp % Alignment == 0 ); 203 203 printf( "CFA array align_alloc, fill\n" ); 204 for ( i nt i = 0; i < dim; i += 1) { printf( "%#x %a, ", stp[i].x, stp[i].y ); }204 for ( i; dim ) { printf( "%#x %a, ", stp[i].x, stp[i].y ); } 205 205 printf( "\n" ); 206 206 free( stp ); … … 221 221 amemset( sta, fill, dim ); // CFA array memset, type safe 222 222 printf( "CFA array memset\n" ); 223 for ( i nt i = 0; i < dim; i += 1) { printf( "%#x %a, ", sta[i].x, sta[i].y ); }223 for ( i; dim ) { printf( "%#x %a, ", sta[i].x, sta[i].y ); } 224 224 printf( "\n" ); 225 225 226 226 amemcpy( sta1, sta, dim ); // CFA array memcpy, type safe 227 227 printf( "CFA array memcpy\n" ); 228 for ( i nt i = 0; i < dim; i += 1) { printf( "%#x %a, ", sta1[i].x, sta1[i].y ); }228 for ( i; dim ) { printf( "%#x %a, ", sta1[i].x, sta1[i].y ); } 229 229 printf( "\n" ); 230 230 … … 241 241 stp = anew( dim, 42, 42.5 ); 242 242 printf( "CFA array new initialize\n" ); 243 for ( i nt i = 0; i < dim; i += 1) { printf( "%d %g, ", stp[i].x, stp[i].y ); }243 for ( i; dim ) { printf( "%d %g, ", stp[i].x, stp[i].y ); } 244 244 printf( "\n" ); 245 245 stp1 = anew( dim, 42, 42.5 ); 246 for ( i nt i = 0; i < dim; i += 1) { printf( "%d %g, ", stp1[i].x, stp1[i].y ); }246 for ( i; dim ) { printf( "%d %g, ", stp1[i].x, stp1[i].y ); } 247 247 printf( "\n" ); 248 248 adelete( dim, stp, dim, stp1 ); -
tests/ato.c
r2b79a70 rcdbab55 1 // 1 // 2 2 // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo 3 3 // 4 4 // The contents of this file are covered under the licence agreement in the 5 5 // file "LICENCE" distributed with Cforall. 6 // 7 // ato.c -- 8 // 6 // 7 // ato.c -- 8 // 9 9 // Author : Peter A. Buhr 10 10 // Created On : Thu Feb 4 08:10:57 2016 … … 12 12 // Last Modified On : Thu Nov 16 18:31:56 2017 13 13 // Update Count : 89 14 // 14 // 15 15 16 #include <fstream >17 #include <stdlib > // ato, strto16 #include <fstream.hfa> 17 #include <stdlib.hfa> // ato, strto 18 18 19 19 int main( void ) { -
tests/avltree/avl1.c
r2b79a70 rcdbab55 1 1 #include "avl.h" 2 2 // #include "cwrap.h" 3 #include <stdlib >3 #include <stdlib.hfa> 4 4 5 5 forall(otype K | Comparable(K), otype V) -
tests/avltree/avl3.c
r2b79a70 rcdbab55 1 1 #include "avl.h" 2 2 #include "avl-private.h" 3 #include <stdlib >3 #include <stdlib.hfa> 4 4 5 5 // swaps the data within two tree nodes -
tests/avltree/avl_test.c
r2b79a70 rcdbab55 1 1 #include "avl.h" 2 2 #include "avl-private.h" 3 #include <stdlib >3 #include <stdlib.hfa> 4 4 5 5 extern "C" { -
tests/complex.c
r2b79a70 rcdbab55 1 // 1 // 2 2 // Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo 3 3 // 4 4 // The contents of this file are covered under the licence agreement in the 5 5 // file "LICENCE" distributed with Cforall. 6 // 7 // complex.c -- 8 // 6 // 7 // complex.c -- 8 // 9 9 // Author : Peter A. Buhr 10 10 // Created On : Wed May 24 22:07:31 2017 … … 12 12 // Last Modified On : Wed May 24 22:08:01 2017 13 13 // Update Count : 1 14 // 14 // 15 15 16 16 #include <stdio.h> 17 17 #include <complex.h> 18 18 #ifdef __CFA__ 19 #include <fstream >19 #include <fstream.hfa> 20 20 #endif // __CFA 21 21 -
tests/concurrent/coroutineYield.c
r2b79a70 rcdbab55 1 #include <fstream >2 #include <kernel >3 #include <stdlib >4 #include <thread >5 #include <time >1 #include <fstream.hfa> 2 #include <kernel.hfa>hfa> 3 #include <stdlib.hfa> 4 #include <thread.hfa> 5 #include <time.hfa> 6 6 7 7 #define __kick_rate 150000ul -
tests/concurrent/examples/boundedBufferEXT.c
r2b79a70 rcdbab55 8 8 // Created On : Wed Apr 18 22:52:12 2018 9 9 // Last Modified By : Peter A. Buhr 10 // Last Modified On : Wed May 2 16:12:58201811 // Update Count : 710 // Last Modified On : Thu Aug 16 08:17:03 2018 11 // Update Count : 8 12 12 // 13 13 14 #include <stdlib > // random15 #include <fstream >16 #include <kernel >17 #include <thread >14 #include <stdlib.hfa> // random 15 #include <fstream.hfa> 16 #include <kernel.hfa> 17 #include <thread.hfa> 18 18 #include <unistd.h> // getpid 19 19 … … 73 73 void main( Consumer & cons ) with( cons ) { 74 74 sum = 0; 75 for ( ;;) {75 for () { 76 76 yield( random( 5 ) ); 77 77 int item = remove( buffer ); -
tests/concurrent/examples/boundedBufferINT.c
r2b79a70 rcdbab55 8 8 // Created On : Mon Oct 30 12:45:13 2017 9 9 // Last Modified By : Peter A. Buhr 10 // Last Modified On : Thu A pr 26 23:08:17201811 // Update Count : 8 210 // Last Modified On : Thu Aug 16 08:17:58 2018 11 // Update Count : 83 12 12 // 13 13 14 #include <stdlib > // random15 #include <fstream >16 #include <kernel >17 #include <thread >14 #include <stdlib.hfa> // random 15 #include <fstream.hfa> 16 #include <kernel.hfa> 17 #include <thread.hfa> 18 18 #include <unistd.h> // getpid 19 19 … … 74 74 void main( Consumer & cons ) with( cons ) { 75 75 sum = 0; 76 for ( ;;) {76 for () { 77 77 yield( random( 5 ) ); 78 78 int item = remove( buffer ); -
tests/concurrent/examples/datingService.c
r2b79a70 rcdbab55 12 12 // 13 13 14 #include <stdlib > // random15 #include <fstream >16 #include <kernel >17 #include <thread >14 #include <stdlib.hfa> // random 15 #include <fstream.hfa> 16 #include <kernel.hfa> 17 #include <thread.hfa> 18 18 #include <unistd.h> // getpid 19 19 -
tests/concurrent/examples/matrixSum.c
r2b79a70 rcdbab55 1 // -*- Mode: C -*- 2 // 1 // -*- Mode: C -*- 2 // 3 3 // Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo 4 4 // 5 5 // The contents of this file are covered under the licence agreement in the 6 6 // file "LICENCE" distributed with Cforall. 7 // 8 // matrixSum.c -- 9 // 7 // 8 // matrixSum.c -- 9 // 10 10 // Author : Peter A. Buhr 11 11 // Created On : Mon Oct 9 08:29:28 2017 12 12 // Last Modified By : Peter A. Buhr 13 // Last Modified On : Fri May 25 09:34:27201814 // Update Count : 1 015 // 13 // Last Modified On : Thu Aug 9 09:17:30 2018 14 // Update Count : 13 15 // 16 16 17 #include <fstream >18 #include <kernel >19 #include <thread >17 #include <fstream.hfa> 18 #include <kernel.hfa> 19 #include <thread.hfa> 20 20 21 21 thread Adder { … … 30 30 void main( Adder & adder ) with( adder ) { // thread starts here 31 31 subtotal = 0; 32 for ( int c = 0; c < cols; c += 1) {32 for ( c; cols ) { 33 33 subtotal += row[c]; 34 34 } // for … … 36 36 37 37 int main() { 38 constint rows = 10, cols = 1000;38 /* const */ int rows = 10, cols = 1000; 39 39 int matrix[rows][cols], subtotals[rows], total = 0; 40 40 processor p; // add kernel thread 41 41 42 for ( int r = 0; r < rows; r += 1) {43 for ( int c = 0; c < cols; c += 1) {42 for ( r; rows ) { 43 for ( c; cols ) { 44 44 matrix[r][c] = 1; 45 45 } // for 46 46 } // for 47 47 Adder * adders[rows]; 48 for ( int r = 0; r < rows; r += 1 ) {// start threads to sum rows48 for ( r; rows ) { // start threads to sum rows 49 49 adders[r] = &(*malloc()){ matrix[r], cols, subtotals[r] }; 50 50 // adders[r] = new( matrix[r], cols, &subtotals[r] ); 51 51 } // for 52 for ( int r = 0; r < rows; r += 1 ) {// wait for threads to finish52 for ( r; rows ) { // wait for threads to finish 53 53 delete( adders[r] ); 54 54 total += subtotals[r]; // total subtotals -
tests/concurrent/examples/quickSort.c
r2b79a70 rcdbab55 9 9 // Created On : Wed Dec 6 12:15:52 2017 10 10 // Last Modified By : Peter A. Buhr 11 // Last Modified On : T ue Jan 30 15:58:58201812 // Update Count : 16 211 // Last Modified On : Thu Aug 16 08:17:41 2018 12 // Update Count : 163 13 13 // 14 14 15 #include <fstream >16 #include <stdlib >17 #include <kernel >18 #include <thread >15 #include <fstream.hfa> 16 #include <stdlib.hfa> 17 #include <kernel.hfa> 18 #include <thread.hfa> 19 19 #include <string.h> // strcmp 20 20 … … 131 131 132 132 if ( &unsortedfile ) { // generate output ? 133 for ( ;;) {133 for () { 134 134 unsortedfile | size; // read number of elements in the list 135 135 if ( eof( unsortedfile ) ) break; -
tests/concurrent/monitor.c
r2b79a70 rcdbab55 1 #include <fstream >2 #include <kernel >3 #include <monitor >4 #include <thread >1 #include <fstream.hfa> 2 #include <kernel.hfa> 3 #include <monitor.hfa> 4 #include <thread.hfa> 5 5 6 6 monitor global_t { -
tests/concurrent/multi-monitor.c
r2b79a70 rcdbab55 1 #include <fstream >2 #include <kernel >3 #include <monitor >4 #include <thread >1 #include <fstream.hfa> 2 #include <kernel.hfa> 3 #include <monitor.hfa> 4 #include <thread.hfa> 5 5 6 6 static int global12, global23, global13; -
tests/concurrent/preempt.c
r2b79a70 rcdbab55 1 #include <kernel >2 #include <thread >3 #include <time >1 #include <kernel.hfa>hfa> 2 #include <thread.hfa> 3 #include <time.hfa> 4 4 5 5 #include "long_tests.h" -
tests/concurrent/signal/block.c
r2b79a70 rcdbab55 7 7 8 8 9 #include <fstream >10 #include <kernel >11 #include <monitor >12 #include <stdlib >13 #include <thread >14 #include <time >9 #include <fstream.hfa> 10 #include <kernel.hfa>hfa> 11 #include <monitor.hfa> 12 #include <stdlib.hfa> 13 #include <thread.hfa> 14 #include <time.hfa> 15 15 16 16 #include "long_tests.h" -
tests/concurrent/signal/disjoint.c
r2b79a70 rcdbab55 1 #include <fstream >2 #include <kernel >3 #include <monitor >4 #include <thread >5 #include <time >1 #include <fstream.hfa> 2 #include <kernel.hfa>hfa> 3 #include <monitor.hfa> 4 #include <thread.hfa> 5 #include <time.hfa> 6 6 7 7 #include "long_tests.h" -
tests/concurrent/signal/wait.c
r2b79a70 rcdbab55 5 5 6 6 7 #include <fstream >8 #include <kernel >9 #include <monitor >10 #include <stdlib >11 #include <thread >12 #include <time >7 #include <fstream.hfa> 8 #include <kernel.hfa>hfa> 9 #include <monitor.hfa> 10 #include <stdlib.hfa> 11 #include <thread.hfa> 12 #include <time.hfa> 13 13 14 14 #define __kick_rate 12000ul -
tests/concurrent/thread.c
r2b79a70 rcdbab55 1 #include <fstream >2 #include <kernel >3 #include <stdlib >4 #include <thread >1 #include <fstream.hfa> 2 #include <kernel.hfa> 3 #include <stdlib.hfa> 4 #include <thread.hfa> 5 5 6 6 thread First { semaphore* lock; }; -
tests/concurrent/waitfor/barge.c
r2b79a70 rcdbab55 6 6 //--------------------------------------------------------- 7 7 8 #include <fstream >9 #include <kernel >10 #include <monitor >11 #include <stdlib >12 #include <thread >8 #include <fstream.hfa> 9 #include <kernel.hfa> 10 #include <monitor.hfa> 11 #include <stdlib.hfa> 12 #include <thread.hfa> 13 13 14 14 #include <stdbool.h> -
tests/concurrent/waitfor/dtor.c
r2b79a70 rcdbab55 4 4 //--------------------------------------------------------- 5 5 6 #include <fstream >7 #include <kernel >8 #include <monitor >9 #include <stdlib >10 #include <thread >6 #include <fstream.hfa> 7 #include <kernel.hfa> 8 #include <monitor.hfa> 9 #include <stdlib.hfa> 10 #include <thread.hfa> 11 11 12 12 #include <stdbool.h> -
tests/concurrent/waitfor/else.c
r2b79a70 rcdbab55 1 #include <fstream >2 #include <monitor >1 #include <fstream.hfa> 2 #include <monitor.hfa> 3 3 4 4 #include <stdbool.h> -
tests/concurrent/waitfor/parse.c
r2b79a70 rcdbab55 8 8 //---------------------------------------------------------------------------------------- 9 9 10 #include <monitor >10 #include <monitor.hfa> 11 11 12 12 monitor M {}; -
tests/concurrent/waitfor/recurse.c
r2b79a70 rcdbab55 4 4 //----------------------------------------------------------------- 5 5 6 #include <fstream >7 #include <kernel >8 #include <monitor >9 #include <stdlib >10 #include <thread >6 #include <fstream.hfa> 7 #include <kernel.hfa> 8 #include <monitor.hfa> 9 #include <stdlib.hfa> 10 #include <thread.hfa> 11 11 12 12 #include <stdbool.h> -
tests/concurrent/waitfor/simple.c
r2b79a70 rcdbab55 1 #include <fstream >2 #include <kernel >3 #include <monitor >4 #include <stdlib >5 #include <thread >1 #include <fstream.hfa> 2 #include <kernel.hfa> 3 #include <monitor.hfa> 4 #include <stdlib.hfa> 5 #include <thread.hfa> 6 6 7 7 #include <time.h> -
tests/concurrent/waitfor/statment.c
r2b79a70 rcdbab55 1 #include <fstream >2 #include <kernel >3 #include <monitor >4 #include <thread >1 #include <fstream.hfa> 2 #include <kernel.hfa> 3 #include <monitor.hfa> 4 #include <thread.hfa> 5 5 6 6 #include <stdbool.h> -
tests/concurrent/waitfor/when.c
r2b79a70 rcdbab55 4 4 //----------------------------------------------------------------- 5 5 6 #include <fstream >7 #include <kernel >8 #include <monitor >9 #include <stdlib >10 #include <thread >6 #include <fstream.hfa> 7 #include <kernel.hfa> 8 #include <monitor.hfa> 9 #include <stdlib.hfa> 10 #include <thread.hfa> 11 11 12 12 #include <stdbool.h> -
tests/config.py.in
r2b79a70 rcdbab55 5 5 """ 6 6 7 SRCDIR = "@ srcdir@"8 BUILDDIR = "@ builddir@"7 SRCDIR = "@abs_srcdir@" 8 BUILDDIR = "@abs_builddir@" 9 9 HOSTARCH = "@host_cpu@" -
tests/coroutine/.in/fmtLines.txt
r2b79a70 rcdbab55 1 // 1 // 2 2 // Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo 3 3 // 4 4 // The contents of this file are covered under the licence agreement in the 5 5 // file "LICENCE" distributed with Cforall. 6 // 7 // fmtLines.cc -- 8 // 6 // 7 // fmtLines.cc -- 8 // 9 9 // Author : Peter A. Buhr 10 10 // Created On : Sun Sep 17 21:56:15 2017 … … 12 12 // Last Modified On : Mon Sep 18 11:35:57 2017 13 13 // Update Count : 31 14 // 14 // 15 15 16 #include <fstream >17 #include <coroutine >16 #include <fstream.hfa> 17 #include <coroutine.hfa> 18 18 19 19 coroutine Format { -
tests/coroutine/fibonacci.c
r2b79a70 rcdbab55 6 6 // 7 7 // fibonacci.c -- 3-state finite-state machine 8 9 8 // 10 9 // Author : Thierry Delisle 11 10 // Created On : Thu Jun 8 07:29:37 2017 12 11 // Last Modified By : Peter A. Buhr 13 // Last Modified On : Fri Apr 27 08:55:31201814 // Update Count : 1912 // Last Modified On : Sat Aug 18 11:21:58 2018 13 // Update Count : 24 15 14 // 16 15 17 #include <fstream >18 #include <coroutine >16 #include <fstream.hfa> 17 #include <coroutine.hfa> 19 18 20 19 coroutine Fibonacci { int fn; }; // used for communication … … 26 25 fn = 1; fn2 = fn1; fn1 = fn; // 2nd case 27 26 suspend(); // restart last resume 28 for ( ;;) {27 for () { 29 28 fn = fn1 + fn2; fn2 = fn1; fn1 = fn; // general case 30 29 suspend(); // restart last resume … … 39 38 int main() { 40 39 Fibonacci f1, f2; 41 for ( int i = 1; i <= 10; i += 1 ) {40 for ( 10 ) { // print N Fibonacci values 42 41 sout | next( f1 ) | next( f2 ) | endl; 43 42 } // for -
tests/coroutine/fmtLines.c
r2b79a70 rcdbab55 1 // 1 // 2 2 // Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo 3 3 // 4 4 // The contents of this file are covered under the licence agreement in the 5 5 // file "LICENCE" distributed with Cforall. 6 // 6 // 7 7 // fmtLines.cc -- format characters into blocks of 4 and groups of 5 blocks per line 8 // 8 // 9 9 // Author : Peter A. Buhr 10 10 // Created On : Sun Sep 17 21:56:15 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T ue May 15 12:25:33201813 // Update Count : 4 214 // 12 // Last Modified On : Thu Aug 16 08:20:54 2018 13 // Update Count : 45 14 // 15 15 16 #include <fstream >17 #include <coroutine >16 #include <fstream.hfa> 17 #include <coroutine.hfa> 18 18 19 19 coroutine Format { … … 23 23 24 24 void main( Format & fmt ) with( fmt ) { 25 for ( ;; ) {// for as many characters26 for ( g = 0; g < 5; g += 1 ) {// groups of 5 blocks27 for ( b = 0; b < 4; b += 1 ) {// blocks of 4 characters28 for ( ;; ) {// for newline characters25 for () { // for as many characters 26 for ( g; 5 ) { // groups of 5 blocks 27 for ( b; 4 ) { // blocks of 4 characters 28 for () { // for newline characters 29 29 suspend(); 30 30 if ( ch != '\n' ) break; // ignore newline … … 53 53 Format fmt; 54 54 55 eof: for ( ;; ) {// read until end of file55 eof: for () { // read until end of file 56 56 sin | fmt.ch; // read one character 57 57 if ( eof( sin ) ) break eof; // eof ? -
tests/coroutine/pingpong.c
r2b79a70 rcdbab55 1 // 1 // 2 2 // Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo 3 3 // 4 4 // The contents of this file are covered under the licence agreement in the 5 5 // file "LICENCE" distributed with Cforall. 6 // 7 // pingpong.c -- 8 // 6 // 7 // pingpong.c -- 8 // 9 9 // Author : Peter A. Buhr 10 10 // Created On : Wed Sep 20 11:55:23 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Sep 20 13:41:39 201713 // Update Count : 2 614 // 12 // Last Modified On : Sat Aug 18 11:31:11 2018 13 // Update Count : 28 14 // 15 15 16 #include <coroutine >17 #include <fstream >16 #include <coroutine.hfa> 17 #include <fstream.hfa> 18 18 19 19 coroutine PingPong { … … 39 39 } 40 40 void main( PingPong & pingpong ) { // ping's starter ::main, pong's starter ping 41 for ( unsigned int i = 0; i < pingpong.N; i += 1 ) {41 for ( pingpong.N ) { // N ping-pongs 42 42 sout | pingpong.name | endl; 43 43 cycle( *pingpong.part ); -
tests/coroutine/prodcons.c
r2b79a70 rcdbab55 1 // 1 // 2 2 // Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo 3 3 // 4 4 // The contents of this file are covered under the licence agreement in the 5 5 // file "LICENCE" distributed with Cforall. 6 // 7 // prodcons.c -- 8 // 6 // 7 // prodcons.c -- 8 // 9 9 // Author : Peter A. Buhr 10 10 // Created On : Mon Sep 18 12:23:39 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Jan 2 12:17:01201813 // Update Count : 4714 // 12 // Last Modified On : Sat Aug 18 12:55:10 2018 13 // Update Count : 51 14 // 15 15 16 #include <fstream >17 #include <coroutine >18 #include <stdlib >// random16 #include <fstream.hfa> 17 #include <coroutine.hfa> 18 #include <stdlib.hfa> // random 19 19 #include <unistd.h> // getpid 20 20 … … 29 29 void main( Prod & prod ) with( prod ) { // starter ::main 30 30 // 1st resume starts here 31 for ( i nt i = 0; i < N; i += 1 ) {31 for ( i; N ) { // N pairs of values 32 32 int p1 = random( 100 ); 33 33 int p2 = random( 100 ); -
tests/coroutine/runningTotal.c
r2b79a70 rcdbab55 1 // 1 // 2 2 // Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo 3 3 // 4 4 // The contents of this file are covered under the licence agreement in the 5 5 // file "LICENCE" distributed with Cforall. 6 // 7 // runningTotal.c -- 8 // 6 // 7 // runningTotal.c -- 8 // 9 9 // Author : Peter A. Buhr 10 10 // Created On : Wed Dec 6 08:05:27 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Dec 6 08:09:24 201713 // Update Count : 214 // 12 // Last Modified On : Thu Aug 16 08:22:29 2018 13 // Update Count : 3 14 // 15 15 16 #include <fstream >17 #include <coroutine >16 #include <fstream.hfa> 17 #include <coroutine.hfa> 18 18 19 19 coroutine RunTotal { // input numbers and return running total … … 29 29 30 30 void main( RunTotal & rntl ) with( rntl ) { 31 for ( ;;) {31 for () { 32 32 update( rntl, input ); 33 33 } // for … … 41 41 int main() { 42 42 RunTotal rntl; 43 for ( i nt i = 0; i < 10; i += 1) {43 for ( i; 10 ) { 44 44 sout | i | add( rntl, i ) | endl; 45 45 } // for -
tests/div.c
r2b79a70 rcdbab55 1 // 1 // 2 2 // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo 3 3 // 4 4 // The contents of this file are covered under the licence agreement in the 5 5 // file "LICENCE" distributed with Cforall. 6 // 7 // div.c -- 8 // 6 // 7 // div.c -- 8 // 9 9 // Author : Peter A. Buhr 10 10 // Created On : Tue Aug 8 16:28:43 2017 … … 12 12 // Last Modified On : Thu Dec 7 09:06:52 2017 13 13 // Update Count : 18 14 // 14 // 15 15 16 #include <fstream >17 #include <stdlib > // div16 #include <fstream.hfa> 17 #include <stdlib.hfa> // div 18 18 19 19 struct T { int i; }; -
tests/except-2.c
r2b79a70 rcdbab55 2 2 3 3 4 #include <stdlib >4 #include <stdlib.hfa> 5 5 #include "except-mac.h" 6 6 -
tests/fallthrough.c
r2b79a70 rcdbab55 10 10 // Created On : Wed Mar 14 10:06:25 2018 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Mar 14 22:45:13201813 // Update Count : 1 312 // Last Modified On : Thu Aug 16 08:21:46 2018 13 // Update Count : 14 14 14 // 15 15 … … 92 92 choose ( 3 ) { 93 93 case 2: 94 for ( ;;) {94 for () { 95 95 choose ( 2 ) { 96 96 case 1: -
tests/fstream_test.c
r2b79a70 rcdbab55 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // fstream_test.c -- 7 // fstream_test.c -- 8 8 // 9 9 // Author : Peter A. Buhr … … 14 14 // 15 15 16 #include <fstream >16 #include <fstream.hfa> 17 17 18 18 int main( void ) { -
tests/function-operator.c
r2b79a70 rcdbab55 10 10 // Created On : Fri Aug 25 15:21:11 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Dec 7 12:42:26 201713 // Update Count : 612 // Last Modified On : Thu Aug 2 09:27:53 2018 13 // Update Count : 8 14 14 // 15 15 16 #include <fstream >17 #include <stdlib >16 #include <fstream.hfa> 17 #include <stdlib.hfa> 18 18 19 19 #define length(array) (sizeof((array))/sizeof((array)[0])) … … 92 92 void ?{}(ostream_iterator & iter, ofstream * out) { 93 93 iter.out = new(out); 94 }94 } 95 95 // no destructor, memory leak. This is necessary for this to work at the moment, since 96 96 // *? requires its parameter by value and returns a reference. … … 168 168 transform(begin(x), end(x), begin(x), ×2); 169 169 copy(begin(x), end(x), out_iter); 170 171 // REMOVE WHEN ?* PROBLEM FIXED. 172 delete(out_iter.out); 170 173 } 171 174 -
tests/genericUnion.c
r2b79a70 rcdbab55 1 #include <limits >1 #include <limits.hfa> 2 2 3 3 forall(otype T) -
tests/gmp.c
r2b79a70 rcdbab55 1 // 1 // 2 2 // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo 3 3 // 4 4 // The contents of this file are covered under the licence agreement in the 5 5 // file "LICENCE" distributed with Cforall. 6 // 7 // gmp.c -- 8 // 6 // 7 // gmp.c -- 8 // 9 9 // Author : Peter A. Buhr 10 10 // Created On : Tue Apr 19 08:55:51 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Sep 28 18:33:51 201713 // Update Count : 55 514 // 12 // Last Modified On : Sat Aug 18 12:43:13 2018 13 // Update Count : 556 14 // 15 15 16 16 // NOTE: UBUNTU DOES NOT SUPPORT GMP MULTILIB, SO ONLY 64-BIT GMP IS TESTED. 17 17 18 #include <gmp >18 #include <gmp.hfa> 19 19 20 20 int main( void ) { … … 89 89 fn = 1; fn2 = fn1; fn1 = fn; // 2nd case 90 90 sout | 1 | fn | endl; 91 for ( unsigned int i = 2; i <= 200; i += 1) {91 for ( i; 2u ~= 200 ) { 92 92 fn = fn1 + fn2; fn2 = fn1; fn1 = fn; // general case 93 93 sout | i | fn | endl; … … 99 99 Int fact = 1; // 1st case 100 100 sout | (int)0 | fact | endl; 101 for ( unsigned int i = 1; i <= 40; i += 1) {101 for ( i; 1u ~= 40u ) { 102 102 fact *= i; // general case 103 103 sout | i | fact | endl; -
tests/heap.c
r2b79a70 rcdbab55 1 #include <thread >2 #include <kernel > // processor3 #include <stdlib > // *allocs1 #include <thread.hfa> 2 #include <kernel.hfa> // processor 3 #include <stdlib.hfa> // *allocs 4 4 #include <malloc.h> // malloc_* 5 5 6 // #include <time >6 // #include <time.hfa> 7 7 // #define __CFA_DEFAULT_PREEMPTION__ 1000`us 8 8 // //#define __CFA_DEFAULT_PREEMPTION__ 0 -
tests/hello.c
r2b79a70 rcdbab55 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // hello.c -- 7 // hello.c -- 8 8 // 9 9 // Author : Peter A. Buhr … … 14 14 // 15 15 16 #include <fstream >16 #include <fstream.hfa> 17 17 18 18 int main() { -
tests/identity.c
r2b79a70 rcdbab55 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // identity.c -- 7 // identity.c -- 8 8 // 9 9 // Author : Peter A. Buhr … … 14 14 // 15 15 16 #include <fstream >16 #include <fstream.hfa> 17 17 18 18 forall( otype T ) -
tests/ifwhileCtl.c
r2b79a70 rcdbab55 14 14 // 15 15 16 #include <fstream >16 #include <fstream.hfa> 17 17 18 18 int f( int r ) { return r; } -
tests/io1.c
r2b79a70 rcdbab55 1 // 1 // 2 2 // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo 3 3 // 4 4 // The contents of this file are covered under the licence agreement in the 5 5 // file "LICENCE" distributed with Cforall. 6 // 7 // io1.c -- 8 // 6 // 7 // io1.c -- 8 // 9 9 // Author : Peter A. Buhr 10 10 // Created On : Wed Mar 2 16:56:02 2016 … … 12 12 // Last Modified On : Thu May 24 21:17:56 2018 13 13 // Update Count : 104 14 // 14 // 15 15 16 #include <fstream >16 #include <fstream.hfa> 17 17 18 18 int main() { -
tests/io2.c
r2b79a70 rcdbab55 14 14 // 15 15 16 #include <fstream >16 #include <fstream.hfa> 17 17 18 18 #define xstr(s) str(s) -
tests/labelledExit.c
r2b79a70 rcdbab55 10 10 // Created On : Wed Aug 10 07:29:39 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Aug 10 07:30:15 201613 // Update Count : 112 // Last Modified On : Thu Aug 16 08:55:39 2018 13 // Update Count : 3 14 14 // 15 15 … … 60 60 } 61 61 62 D: for ( ;;) {62 D: for () { 63 63 break D; 64 64 continue D; … … 67 67 Z : i += 1; 68 68 goto Z; 69 X: Y: for ( ;;) {69 X: Y: for () { 70 70 i += 1; 71 71 if ( i > 5 ) continue X; … … 74 74 break; 75 75 } 76 XX: for ( ;;) {77 YY: for ( ;;) {78 ZZ: for ( ;;) {76 XX: for () { 77 YY: for () { 78 ZZ: for () { 79 79 i += 1; 80 80 if ( i > 5 ) continue XX; … … 89 89 } 90 90 91 for ( ;;) ;91 for () ; 92 92 for ( int i = 0 ;; ) ; 93 93 for ( ; i < 0; ) ; … … 97 97 L20: L21: L22: L23: L24: L25: L26: L27: L28: L29: 98 98 L31: L32: L33: L34: 99 for ( ;;) {99 for () { 100 100 break L0; 101 101 } -
tests/limits.c
r2b79a70 rcdbab55 14 14 // 15 15 16 #include <limits >16 #include <limits.hfa> 17 17 18 18 // Integral Constants -
tests/literals.c
r2b79a70 rcdbab55 1 // 1 // 2 2 // Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo 3 3 // 4 4 // The contents of this file are covered under the licence agreement in the 5 5 // file "LICENCE" distributed with Cforall. 6 // 7 // literals.c -- 8 // 6 // 7 // literals.c -- 8 // 9 9 // Author : Peter A. Buhr 10 10 // Created On : Sat Sep 9 16:34:38 2017 … … 12 12 // Last Modified On : Sun Jul 1 15:12:15 2018 13 13 // Update Count : 137 14 // 14 // 15 15 16 16 #ifdef __CFA__ 17 17 #include <stdint.h> 18 #include <fstream >18 #include <fstream.hfa> 19 19 20 20 void f( char v ) { sout | "char " | v | endl; } … … 221 221 -0123456789.0123456789E+09L32; -0123456789.0123456789E+09L64; -0123456789.0123456789E+09L80; -0123456789.0123456789E+09L128; 222 222 0123456789.0123456789E-09L32; 0123456789.0123456789E-09L64; 0123456789.0123456789E-09L80; 0123456789.0123456789E-09L128; 223 223 224 224 0x0123456789.p09l32; 0x0123456789.p09l64; 0x0123456789.p09l80; 0x0123456789.p09l128; 225 225 +0x0123456789.p09l32; +0x0123456789.p09l64; +0x0123456789.p09l80; +0x0123456789.p09l128; -
tests/math1.c
r2b79a70 rcdbab55 1 // 1 // 2 2 // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo 3 3 // 4 4 // The contents of this file are covered under the licence agreement in the 5 5 // file "LICENCE" distributed with Cforall. 6 // 7 // math1.c -- 8 // 6 // 7 // math1.c -- 8 // 9 9 // Author : Peter A. Buhr 10 10 // Created On : Fri Apr 22 14:59:21 2016 … … 12 12 // Last Modified On : Thu May 24 21:01:15 2018 13 13 // Update Count : 85 14 // 14 // 15 15 16 #include <fstream >17 #include <math >16 #include <fstream.hfa> 17 #include <math.hfa> 18 18 19 19 int main( void ) { … … 41 41 sout | "exp2:" | exp2( 1.0F ) | exp2( 1.0D ) | exp2( 1.0L ) | endl; 42 42 sout | "expm1:" | expm1( 1.0F ) | expm1( 1.0D ) | expm1( 1.0L ) | endl; 43 sout | "pow:" | pow( 1.0F, 1.0F ) | pow( 1.0D, 1.0D ) | pow( 1.0L, 1.0L ) | pow( 1.0F+1.0FI, 1.0F+1.0FI ) | pow( 1.0D+1.0DI, 1.0D+1.0DI ) | pow( 1. 0DL+1.0LI, 1.0DL+1.0LI ) | endl;43 sout | "pow:" | pow( 1.0F, 1.0F ) | pow( 1.0D, 1.0D ) | pow( 1.0L, 1.0L ) | pow( 1.0F+1.0FI, 1.0F+1.0FI ) | pow( 1.0D+1.0DI, 1.0D+1.0DI ) | pow( 1.5DL+1.5LI, 1.5DL+1.5LI ) | endl; 44 44 45 45 int b = 4; -
tests/math2.c
r2b79a70 rcdbab55 1 // 1 // 2 2 // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo 3 3 // 4 4 // The contents of this file are covered under the licence agreement in the 5 5 // file "LICENCE" distributed with Cforall. 6 // 7 // math2.c -- 8 // 6 // 7 // math2.c -- 8 // 9 9 // Author : Peter A. Buhr 10 10 // Created On : Fri Apr 22 14:59:21 2016 … … 12 12 // Last Modified On : Thu May 24 21:06:10 2018 13 13 // Update Count : 82 14 // 14 // 15 15 16 #include <fstream >17 #include <math >16 #include <fstream.hfa> 17 #include <math.hfa> 18 18 19 19 int main( void ) { -
tests/math3.c
r2b79a70 rcdbab55 1 // 1 // 2 2 // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo 3 3 // 4 4 // The contents of this file are covered under the licence agreement in the 5 5 // file "LICENCE" distributed with Cforall. 6 // 7 // math3.c -- 8 // 6 // 7 // math3.c -- 8 // 9 9 // Author : Peter A. Buhr 10 10 // Created On : Fri Apr 22 14:59:21 2016 … … 12 12 // Last Modified On : Thu May 24 21:06:12 2018 13 13 // Update Count : 82 14 // 14 // 15 15 16 #include <fstream >17 #include <math >16 #include <fstream.hfa> 17 #include <math.hfa> 18 18 19 19 int main( void ) { -
tests/math4.c
r2b79a70 rcdbab55 1 // 1 // 2 2 // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo 3 3 // 4 4 // The contents of this file are covered under the licence agreement in the 5 5 // file "LICENCE" distributed with Cforall. 6 // 7 // math4.c -- 8 // 6 // 7 // math4.c -- 8 // 9 9 // Author : Peter A. Buhr 10 10 // Created On : Thu May 24 20:56:54 2018 … … 12 12 // Last Modified On : Thu May 24 20:58:06 2018 13 13 // Update Count : 2 14 // 14 // 15 15 16 #include <fstream >17 #include <math >16 #include <fstream.hfa> 17 #include <math.hfa> 18 18 19 19 int main( void ) { -
tests/maybe.c
r2b79a70 rcdbab55 15 15 16 16 #include <assert.h> 17 #include <containers/maybe >17 #include <containers/maybe.hfa> 18 18 19 19 void checkPredicates() { -
tests/minmax.c
r2b79a70 rcdbab55 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // minmax.c -- 7 // minmax.c -- 8 8 // 9 9 // Author : Peter A. Buhr … … 14 14 // 15 15 16 #include <fstream >17 #include <stdlib > // min, max16 #include <fstream.hfa> 17 #include <stdlib.hfa> // min, max 18 18 19 19 int main( void ) { -
tests/preempt_longrun/Makefile.am
r2b79a70 rcdbab55 14 14 ## Update Count : 0 15 15 ############################################################################### 16 17 AUTOMAKE_OPTIONS = foreign # do not require all the GNU file names 16 18 17 19 repeats=10 -
tests/preempt_longrun/Makefile.in
r2b79a70 rcdbab55 91 91 build_triplet = @build@ 92 92 host_triplet = @host@ 93 subdir = src/tests/preempt_longrun93 subdir = tests/preempt_longrun 94 94 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 95 am__aclocal_m4_deps = $(top_srcdir)/configure.ac 95 am__aclocal_m4_deps = $(top_srcdir)/automake/cfa.m4 \ 96 $(top_srcdir)/configure.ac 96 97 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 97 98 $(ACLOCAL_M4) … … 338 339 BACKEND_CC = @BACKEND_CC@ 339 340 BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@ 340 BUILD_IN_TREE_FLAGS_NOLIB = @BUILD_IN_TREE_FLAGS_NOLIB@341 341 CC = @CFACC@ 342 342 CCAS = @CCAS@ … … 369 369 EXEEXT = @EXEEXT@ 370 370 GREP = @GREP@ 371 HOST_FLAGS = @HOST_FLAGS@ 371 372 INSTALL = @INSTALL@ 372 373 INSTALL_DATA = @INSTALL_DATA@ … … 378 379 LEXLIB = @LEXLIB@ 379 380 LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ 381 LIBCFA_TARGET_DIRS = @LIBCFA_TARGET_DIRS@ 382 LIBCFA_TARGET_MAKEFILES = @LIBCFA_TARGET_MAKEFILES@ 380 383 LIBOBJS = @LIBOBJS@ 381 384 LIBS = @LIBS@ 382 385 LTLIBOBJS = @LTLIBOBJS@ 383 MACHINE_TYPE = @MACHINE_TYPE@384 386 MAKEINFO = @MAKEINFO@ 385 387 MKDIR_P = @MKDIR_P@ … … 397 399 SHELL = @SHELL@ 398 400 STRIP = @STRIP@ 401 TARGET_HOSTS = @TARGET_HOSTS@ 399 402 VERSION = @VERSION@ 400 403 YACC = @YACC@ … … 452 455 top_builddir = @top_builddir@ 453 456 top_srcdir = @top_srcdir@ 457 AUTOMAKE_OPTIONS = foreign # do not require all the GNU file names 454 458 repeats = 10 455 459 max_time = 600 … … 479 483 esac; \ 480 484 done; \ 481 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/tests/preempt_longrun/Makefile'; \485 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/preempt_longrun/Makefile'; \ 482 486 $(am__cd) $(top_srcdir) && \ 483 $(AUTOMAKE) --foreign src/tests/preempt_longrun/Makefile487 $(AUTOMAKE) --foreign tests/preempt_longrun/Makefile 484 488 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 485 489 @case '$?' in \ -
tests/preempt_longrun/create.c
r2b79a70 rcdbab55 1 #include <kernel >2 #include <thread >3 #include <time >1 #include <kernel.hfa> 2 #include <thread.hfa> 3 #include <time.hfa> 4 4 5 5 #include "long_tests.h" -
tests/preempt_longrun/enter.c
r2b79a70 rcdbab55 1 #include <kernel >2 #include <monitor >3 #include <thread >4 #include <time >1 #include <kernel.hfa> 2 #include <monitor.hfa> 3 #include <thread.hfa> 4 #include <time.hfa> 5 5 6 6 #define __kick_rate 75000ul -
tests/preempt_longrun/enter3.c
r2b79a70 rcdbab55 1 #include <kernel >2 #include <monitor >3 #include <thread >4 #include <time >1 #include <kernel.hfa> 2 #include <monitor.hfa> 3 #include <thread.hfa> 4 #include <time.hfa> 5 5 6 6 #define __kick_rate 75000ul -
tests/preempt_longrun/processor.c
r2b79a70 rcdbab55 1 #include <kernel >2 #include <thread >3 #include <time >1 #include <kernel.hfa> 2 #include <thread.hfa> 3 #include <time.hfa> 4 4 5 5 #include <unistd.h> -
tests/preempt_longrun/stack.c
r2b79a70 rcdbab55 1 #include <kernel >2 #include <math >3 #include <thread >4 #include <time >1 #include <kernel.hfa> 2 #include <math.hfa> 3 #include <thread.hfa> 4 #include <time.hfa> 5 5 6 6 #define __kick_rate 5000000ul -
tests/preempt_longrun/yield.c
r2b79a70 rcdbab55 1 #include <kernel >2 #include <thread >3 #include <time >1 #include <kernel.hfa> 2 #include <thread.hfa> 3 #include <time.hfa> 4 4 5 5 #define __kick_rate 550000ul -
tests/pybin/tools.py
r2b79a70 rcdbab55 36 36 37 37 def is_ascii(fname): 38 if settings.dry_run: 39 print("is_ascii: %s" % fname) 40 return True 41 38 42 if not os.path.isfile(fname): 39 43 return False … … 52 56 # Remove 1 or more files silently 53 57 def rm( files ): 54 try: 58 if isinstance( files, basestring ): 59 sh("rm -f %s > /dev/null 2>&1" % files ) 60 else: 55 61 for file in files: 56 62 sh("rm -f %s > /dev/null 2>&1" % file ) 57 except TypeError:58 sh("rm -f %s > /dev/null 2>&1" % files )59 63 60 64 # Create 1 or more directory 61 65 def mkdir( files ): 62 try: 66 if isinstance( files, basestring ): 67 sh("mkdir -p %s" % os.path.dirname(files) ) 68 else: 63 69 for file in files: 64 70 sh("mkdir -p %s" % os.path.dirname(file) ) 65 except TypeError: 66 sh("mkdir -p %s" % os.path.dirname(files) ) 71 67 72 68 73 def chdir( dest = __main__.__file__ ): … … 74 79 def diff( lhs, rhs ): 75 80 # diff the output of the files 76 diff_cmd = ("diff --ignore-all-space "81 diff_cmd = ("diff --ignore-all-space --text " 77 82 "--ignore-blank-lines " 78 83 "--old-group-format='\t\tmissing lines :\n" … … 100 105 '-s' if silent else '', 101 106 test_param, 107 settings.arch.flags, 102 108 settings.debug.flags, 109 settings.install.flags, 103 110 flags, 104 111 target, … … 129 136 # helper function to replace patterns in a file 130 137 def file_replace(fname, pat, s_after): 138 if settings.dry_run: 139 print("replacing '%s' with '%s' in %s" % (pat, s_after, fname)) 140 return 141 131 142 file = fileinput.FileInput(fname, inplace=True, backup='.bak') 132 143 for line in file: -
tests/quoted_keyword.c
r2b79a70 rcdbab55 14 14 // 15 15 16 #include <fstream >16 #include <fstream.hfa> 17 17 18 18 struct { -
tests/raii/.expect/dtor-early-exit-ERR1.txt
r2b79a70 rcdbab55 1 raii/dtor-early-exit.c:15 3:1 error: jump to label 'L1' crosses initialization of y Branch (Goto)1 raii/dtor-early-exit.c:150:1 error: jump to label 'L1' crosses initialization of y Branch (Goto) 2 2 with target: L1 3 3 with original target: L1 -
tests/raii/.expect/dtor-early-exit-ERR2.txt
r2b79a70 rcdbab55 1 raii/dtor-early-exit.c:21 7:1 error: jump to label 'L2' crosses initialization of y Branch (Goto)1 raii/dtor-early-exit.c:214:1 error: jump to label 'L2' crosses initialization of y Branch (Goto) 2 2 with target: L2 3 3 with original target: L2 -
tests/raii/dtor-early-exit.c
r2b79a70 rcdbab55 10 10 // Created On : Wed Aug 17 08:26:25 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Aug 17 08:29:37 2016 13 // Update Count : 2 14 // 15 16 #include <fstream> 17 #include <stdlib> 18 extern "C" { 19 #define false ((int)0) // until stdbool.h works 20 #define assert(cond) if (! (cond)) { sout | "Assertion failed: (" | #cond | ") at " __FILE__ | ":" | __LINE__ | endl; abort(); } 21 } 12 // Last Modified On : Sat Aug 11 07:58:39 2018 13 // Update Count : 8 14 // 15 16 #include <fstream.hfa> 17 #include <stdlib.hfa> 18 #include <assert.h> 22 19 23 20 struct A { -
tests/raii/globals.c
r2b79a70 rcdbab55 1 #include <fstream >1 #include <fstream.hfa> 2 2 3 3 struct value_t { -
tests/random.c
r2b79a70 rcdbab55 1 // 1 // 2 2 // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo 3 3 // 4 4 // The contents of this file are covered under the licence agreement in the 5 5 // file "LICENCE" distributed with Cforall. 6 // 7 // random.c -- 8 // 6 // 7 // random.c -- 8 // 9 9 // Author : Peter A. Buhr 10 10 // Created On : Tue Jul 5 21:29:30 2016 … … 12 12 // Last Modified On : Tue Jan 2 12:19:34 2018 13 13 // Update Count : 19 14 // 14 // 15 15 16 #include <fstream >17 #include <stdlib > // random16 #include <fstream.hfa> 17 #include <stdlib.hfa> // random 18 18 #include <unistd.h> // getpid 19 19 -
tests/rational.c
r2b79a70 rcdbab55 14 14 // 15 15 16 #include <rational >17 #include <limits >18 #include <stdlib >19 #include <fstream >16 #include <rational.hfa> 17 #include <limits.hfa> 18 #include <stdlib.hfa> 19 #include <fstream.hfa> 20 20 21 21 // UNNECESSARY, FIX ME -
tests/result.c
r2b79a70 rcdbab55 15 15 16 16 #include <assert.h> 17 #include <containers/result >17 #include <containers/result.hfa> 18 18 19 19 void checkPredicates() { -
tests/searchsort.c
r2b79a70 rcdbab55 1 // 1 // 2 2 // Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo 3 3 // 4 4 // The contents of this file are covered under the licence agreement in the 5 5 // file "LICENCE" distributed with Cforall. 6 // 7 // searchsort.c -- 8 // 6 // 7 // searchsort.c -- 8 // 9 9 // Author : Peter A. Buhr 10 10 // Created On : Thu Feb 4 18:17:50 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T ue Jan 2 08:01:17 201813 // Update Count : 10 014 // 12 // Last Modified On : Thu Aug 9 07:54:57 2018 13 // Update Count : 101 14 // 15 15 16 #include <fstream >17 #include <stdlib > // bsearch, qsort16 #include <fstream.hfa> 17 #include <stdlib.hfa> // bsearch, qsort 18 18 #include <stdlib.h> // C version of bsearch 19 19 … … 24 24 int iarr[size]; 25 25 26 for ( unsigned int i = 0; i < size; i += 1) {26 for ( i; 0u ~ size ) { 27 27 iarr[i] = size - i; 28 28 sout | iarr[i] | ", "; … … 32 32 // ascending sort/search by changing < to > 33 33 qsort( iarr, size ); 34 for ( unsigned int i = 0; i < size; i += 1) {34 for ( i; 0u ~ size ) { 35 35 sout | iarr[i] | ", "; 36 36 } // for 37 37 sout | endl; 38 for ( unsigned int i = 0; i < size; i += 1) { // C version38 for ( i; 0u ~ size ) { // C version 39 39 int key = size - i; 40 40 int * v = bsearch( &key, iarr, size, sizeof( iarr[0] ), comp ); … … 43 43 sout | endl; 44 44 45 for ( unsigned int i = 0; i < size; i += 1) {45 for ( i; 0u ~ size ) { 46 46 int * v = bsearch( size - i, iarr, size ); 47 47 sout | size - i | ':' | *v | ", "; 48 48 } // for 49 49 sout | endl; 50 for ( unsigned int i = 0; i < size; i += 1) {50 for ( i; 0u ~ size ) { 51 51 unsigned int posn = bsearch( size - i, iarr, size ); 52 52 sout | size - i | ':' | iarr[posn] | ", "; … … 55 55 56 56 // descending sort/search by changing < to > 57 for ( unsigned int i = 0; i < size; i += 1) {57 for ( i; 0u ~ size ) { 58 58 iarr[i] = i + 1; 59 59 sout | iarr[i] | ", "; … … 63 63 int ?<?( int x, int y ) { return x > y; } 64 64 qsort( iarr, size ); 65 for ( unsigned int i = 0; i < size; i += 1) {65 for ( i; 0u ~ size ) { 66 66 sout | iarr[i] | ", "; 67 67 } // for 68 68 sout | endl; 69 for ( unsigned int i = 0; i < size; i += 1) {69 for ( i; 0u ~ size ) { 70 70 int * v = bsearch( size - i, iarr, size ); 71 71 sout | size - i | ':' | *v | ", "; 72 72 } // for 73 73 sout | endl; 74 for ( unsigned int i = 0; i < size; i += 1) {74 for ( i; 0u ~ size ) { 75 75 unsigned int posn = bsearch( size - i, iarr, size ); 76 76 sout | size - i | ':' | iarr[posn] | ", "; … … 80 80 81 81 double darr[size]; 82 for ( unsigned int i = 0; i < size; i += 1) {82 for ( i; 0u ~ size ) { 83 83 darr[i] = size - i + 0.5; 84 84 sout | darr[i] | ", "; … … 86 86 sout | endl; 87 87 qsort( darr, size ); 88 for ( unsigned int i = 0; i < size; i += 1) {88 for ( i; 0u ~ size ) { 89 89 sout | darr[i] | ", "; 90 90 } // for 91 91 sout | endl; 92 for ( unsigned int i = 0; i < size; i += 1) {92 for ( i; 0u ~ size ) { 93 93 double * v = bsearch( size - i + 0.5, darr, size ); 94 94 sout | size - i + 0.5 | ':' | *v | ", "; 95 95 } // for 96 96 sout | endl; 97 for ( unsigned int i = 0; i < size; i += 1) {97 for ( i; 0u ~ size ) { 98 98 unsigned int posn = bsearch( size - i + 0.5, darr, size ); 99 99 sout | size - i + 0.5 | ':' | darr[posn] | ", "; … … 104 104 int ?<?( S t1, S t2 ) { return t1.i < t2.i && t1.j < t2.j; } 105 105 ofstream & ?|?( ofstream & os, S v ) { return os | v.i | ' ' | v.j; } 106 for ( unsigned int i = 0; i < size; i += 1) {106 for ( i; 0u ~ size ) { 107 107 sarr[i].i = size - i; 108 108 sarr[i].j = size - i + 1; … … 111 111 sout | endl; 112 112 qsort( sarr, size ); 113 for ( unsigned int i = 0; i < size; i += 1) {113 for ( i; 0u ~ size ) { 114 114 sout | sarr[i] | ", "; 115 115 } // for 116 116 sout | endl; 117 for ( unsigned int i = 0; i < size; i += 1) {117 for ( i; 0u ~ size ) { 118 118 S temp = { size - i, size - i + 1 }; 119 119 S * v = bsearch( temp, sarr, size ); … … 121 121 } // for 122 122 sout | endl; 123 for ( unsigned int i = 0; i < size; i += 1) {123 for ( i; 0u ~ size ) { 124 124 S temp = { size - i, size - i + 1 }; 125 125 unsigned int posn = bsearch( temp, sarr, size ); … … 129 129 { 130 130 unsigned int getKey( const S & s ) { return s.j; } 131 for ( unsigned int i = 0; i < size; i += 1) {131 for ( i; 0u ~ size ) { 132 132 sout | sarr[i] | ", "; 133 133 } // for 134 134 sout | endl; 135 for ( unsigned int i = 0; i < size; i += 1) {135 for ( i; 0u ~ size ) { 136 136 S * v = bsearch( size - i + 1, sarr, size ); 137 137 sout | size - i + 1 | ':' | *v | ", "; 138 138 } // for 139 139 sout | endl; 140 for ( unsigned int i = 0; i < size; i += 1) {140 for ( i; 0u ~ size ) { 141 141 unsigned int posn = bsearch( size - i + 1, sarr, size ); 142 142 sout | size - i + 1 | ':' | sarr[posn] | ", "; -
tests/shortCircuit.c
r2b79a70 rcdbab55 22 22 } 23 23 24 #include <fstream >24 #include <fstream.hfa> 25 25 26 26 struct test_t { -
tests/sum.c
r2b79a70 rcdbab55 11 11 // Created On : Wed May 27 17:56:53 2015 12 12 // Last Modified By : Peter A. Buhr 13 // Last Modified On : Sun Jun 3 19:23:41201814 // Update Count : 27 813 // Last Modified On : Thu Aug 2 08:03:09 2018 14 // Update Count : 279 15 15 // 16 16 17 #include <fstream >18 #include <stdlib >17 #include <fstream.hfa> 18 #include <stdlib.hfa> 19 19 20 20 void ?{}( int & c, zero_t ) { c = 0; } // not in prelude … … 115 115 sout | "sum from" | low | "to" | High | "is" 116 116 | sum( size, gs.x ) | ", check" | (int)s | endl; // add field array in generic type 117 delete( gs.x ); 117 118 } // main 118 119 -
tests/swap.c
r2b79a70 rcdbab55 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // swap.c -- 7 // swap.c -- 8 8 // 9 9 // Author : Peter A. Buhr … … 14 14 // 15 15 16 #include <fstream >17 #include <stdlib > // swap16 #include <fstream.hfa> 17 #include <stdlib.hfa> // swap 18 18 19 19 int main( void ) { -
tests/test.py
r2b79a70 rcdbab55 85 85 # create a parser with the arguments for the tests script 86 86 parser = argparse.ArgumentParser(description='Script which runs cforall tests') 87 parser.add_argument('--debug', help='Run all tests in debug or release', type=yes_no, default='no') 87 parser.add_argument('--debug', help='Run all tests in debug or release', type=yes_no, default='yes') 88 parser.add_argument('--install', help='Run all tests based on installed binaries or tree binaries', type=yes_no, default='no') 88 89 parser.add_argument('--arch', help='Test for specific architecture', type=str, default='') 90 parser.add_argument('--timeout', help='Maximum duration in seconds after a single test is considered to have timed out', type=int, default=60) 91 parser.add_argument('--global-timeout', help='Maximum cumulative duration in seconds after the ALL tests are considered to have timed out', type=int, default=7200) 89 92 parser.add_argument('--dry-run', help='Don\'t run the tests, only output the commands', action='store_true') 90 93 parser.add_argument('--list', help='List all test available', action='store_true') … … 97 100 parser.add_argument('tests', metavar='test', type=str, nargs='*', help='a list of tests to run') 98 101 99 options = parser.parse_args() 102 try: 103 options = parser.parse_args() 104 except: 105 print('ERROR: invalid arguments', file=sys.stderr) 106 parser.print_help(sys.stderr) 107 sys.exit(1) 100 108 101 109 # script must have at least some tests to run or be listing … … 154 162 if settings.dry_run or fileIsExecutable(exe_file) : 155 163 # run test 156 retcode, _ = sh("timeout 60 %s > %s 2>&1" % (exe_file, out_file), input = in_file)164 retcode, _ = sh("timeout %d %s > %s 2>&1" % (settings.timeout.single, exe_file, out_file), input = in_file) 157 165 else : 158 166 # simply cat the result into the output … … 166 174 167 175 if retcode == 0: 176 # fixoutput(out_file) 168 177 if settings.generating : 169 178 # if we are ounly generating the output we still need to check that the test actually exists … … 176 185 else : 177 186 # fetch return code and error from the diff command 178 fixoutput(out_file)179 187 retcode, error = diff(cmp_file, out_file) 180 188 … … 228 236 tests, 229 237 chunksize = 1 230 ).get( 7200)238 ).get(settings.timeout.total) 231 239 except KeyboardInterrupt: 232 240 pool.terminate() … … 277 285 # users may want to simply list the tests 278 286 if options.list_comp : 279 print("-h --help --debug --dry-run --list --arch --all --regenerate-expected - j --jobs ", end='')287 print("-h --help --debug --dry-run --list --arch --all --regenerate-expected --install --timeout --global-timeout -j --jobs ", end='') 280 288 print(" ".join(map(lambda t: "%s" % (t.target()), tests))) 281 289 … … 285 293 286 294 else : 295 # check the build configuration works 296 settings.validate() 297 287 298 options.jobs, forceJobs = jobCount( options, tests ) 288 299 settings.updateMakeCmd(forceJobs, options.jobs) -
tests/time.c
r2b79a70 rcdbab55 1 // 1 // 2 2 // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo 3 3 // 4 4 // The contents of this file are covered under the licence agreement in the 5 5 // file "LICENCE" distributed with Cforall. 6 // 7 // time.c -- 8 // 6 // 7 // time.c -- 8 // 9 9 // Author : Peter A. Buhr 10 10 // Created On : Tue Mar 27 17:24:56 2018 … … 12 12 // Last Modified On : Fri Apr 6 11:27:23 2018 13 13 // Update Count : 16 14 // 14 // 15 15 16 #include "time "17 #include <fstream >16 #include "time.hfa" 17 #include <fstream.hfa> 18 18 19 19 int main() { 20 Duration d1 = 3`h, d2 = 2`s, d3 = 3. 07`s, d4 = 12`s, d5 = 1`s + 10_000`ns;20 Duration d1 = 3`h, d2 = 2`s, d3 = 3.375`s, d4 = 12`s, d5 = 1`s + 10_000`ns; 21 21 sout | d1 | d2 | d3 | d4 | d5 | endl; 22 22 int i; -
tests/tuple/tupleAssign.c
r2b79a70 rcdbab55 14 14 // 15 15 16 #include <fstream >16 #include <fstream.hfa> 17 17 18 18 int main() { -
tests/tuple/tupleVariadic.c
r2b79a70 rcdbab55 9 9 // Author : Rob Schluntz 10 10 // Created On : Fri Dec 16 10:25:35 2016 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Fri Dec 21 14:42:48 201613 // Update Count : 211 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Aug 2 09:24:04 2018 13 // Update Count : 6 14 14 // 15 16 #include <stdlib.hfa> 15 17 16 18 void func(void) { … … 28 30 printf("called process(double) %g\n", x); 29 31 } 30 31 forall( dtype T, ttype Params | sized(T) | { void ?{}(T &, Params); } )32 T * new(Params p);33 32 34 33 struct array { … … 66 65 a.data[2] = a2; 67 66 printf("called ?{} with a: %d %d %d\n", a0, a1, a2); 67 } 68 69 void ^?{}(array & a) { 70 free(a.data); 68 71 } 69 72 … … 126 129 bar(x); 127 130 } 131 132 delete(ptr); 133 delete(x4); 134 delete(x3); 135 delete(x2); 136 delete(x1); 137 delete(x0); 128 138 } 129 139 … … 131 141 // tab-width: 4 // 132 142 // End: // 133 -
tests/user_literals.c
r2b79a70 rcdbab55 1 // 1 // 2 2 // Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo 3 3 // 4 4 // The contents of this file are covered under the licence agreement in the 5 5 // file "LICENCE" distributed with Cforall. 6 // 7 // user_literals.c -- 8 // 6 // 7 // user_literals.c -- 8 // 9 9 // Author : Peter A. Buhr 10 10 // Created On : Wed Sep 6 21:40:50 2017 … … 12 12 // Last Modified On : Sun Apr 29 16:51:42 2018 13 13 // Update Count : 54 14 // 14 // 15 15 16 #include <fstream >16 #include <fstream.hfa> 17 17 #include <wchar.h> 18 18 #include <uchar.h> -
tests/vector.c
r2b79a70 rcdbab55 14 14 // 15 15 16 #include <fstream >17 #include <vector >16 #include <fstream.hfa> 17 #include <vector.hfa> 18 18 19 19 #undef assert -
tests/virtualCast.c
r2b79a70 rcdbab55 9 9 */ 10 10 11 #include <stdlib >11 #include <stdlib.hfa> 12 12 #include <assert.h> 13 13
Note:
See TracChangeset
for help on using the changeset viewer.