-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #363 from Don-Ward/FixedPoint
Add classes to uni/lib that implement fixed point arithmetic.
- Loading branch information
Showing
9 changed files
with
1,271 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
################################################################################# | ||
# | ||
# This file is released under the terms of the GNU LIBRARY GENERAL PUBLIC LICENSE | ||
# (LGPL) version 2. The licence may be found in the root directory of the Unicon | ||
# source directory in the file COPYING. | ||
# | ||
# Fixed Point Arithmetic class tests (without operator overloading) | ||
# -------------------------------------------------------------------------------- | ||
|
||
procedure main(args) | ||
if not(&features == "large integers") then | ||
stop("large integers not supported") | ||
|
||
runTests(args) | ||
end | ||
|
||
# Turn off operator overloading | ||
$undef _OVLD | ||
$include "FxPtTests.icn" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
################################################################################# | ||
# | ||
# This file is released under the terms of the GNU LIBRARY GENERAL PUBLIC LICENSE | ||
# (LGPL) version 2. The licence may be found in the root directory of the Unicon | ||
# source directory in the file COPYING. | ||
# | ||
# Fixed Point Arithmetic class tests (with operator overloading) | ||
# -------------------------------------------------------------------------------- | ||
|
||
procedure main(args) | ||
if not(&features == "large integers") then | ||
stop("large integers not supported") | ||
|
||
if not (&features == "operator overloading") then | ||
stop("operator overloading not supported") | ||
|
||
runTests(args) | ||
end | ||
|
||
$include "FxPtTests.icn" | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
include ../Makedefs | ||
|
||
ifneq ("$(wildcard $(UC))","") | ||
TARGETS=$(patsubst %.icn,%,$(wildcard *.icn)) | ||
|
||
SKIP= tester FxPtTests\ | ||
audio dbi list_test nlm q rec test testnlm clin_err hello mintest ovld q2 sel to | ||
else | ||
skip: | ||
@echo "Unicon compiler not found" | ||
|
||
TARGETS=skip | ||
endif | ||
|
||
Test: DoTest | ||
|
||
include ../Makefile.test | ||
|
||
FxPtTest: FxPtTest.icn tester.u | ||
|
||
FxPtTest_OVLD: FxPtTest_OVLD.icn tester.u | ||
|
||
tester.u: tester.icn | ||
$(UC) -s -u -c $^ | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
-------------------------------------------------- | ||
Fixed Point Tests Start | ||
Fixed Point Tests Passed = 454 Failed = 0 | ||
-------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
-------------------------------------------------- | ||
Fixed Point Tests Start | ||
Fixed Point Tests Passed = 586 Failed = 0 | ||
-------------------------------------------------- |
Oops, something went wrong.