Skip to content

Commit

Permalink
fixpnt is now trivially constructable, any implicit initialiation ass…
Browse files Browse the repository at this point in the history
…umptions in the regression tests need to be fixed
  • Loading branch information
Ravenwater committed Aug 7, 2024
1 parent 2d9a822 commit b503195
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions static/fixpnt/binary/logic/logic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ try {
ReportTestSuiteResults(test_suite, nrOfFailedTestCases);
return EXIT_SUCCESS; // ignore failures
#else
fixpnt<16, 1> a;
fixpnt<16, 1> a{0};

#if REGRESSION_LEVEL_1
std::cout << "Logic: operator==()\n";
Expand Down Expand Up @@ -90,10 +90,10 @@ try {
ReportTestResult(0, "fixpnt<16,1> == 0", "== int literal");
}
if (!(a == 0.0f)) {
nrOfFailedTestCases += ReportTestResult(1, "fixpnt<16,1> == 0.0", "== float literal");
nrOfFailedTestCases += ReportTestResult(1, "fixpnt<16,1> == 0.0f", "== float literal");
}
else {
ReportTestResult(0, "fixpnt<16,1> == 0.0", "== float literal");
ReportTestResult(0, "fixpnt<16,1> == 0.0f", "== float literal");
}
if (!(a == 0.0)) {
nrOfFailedTestCases += ReportTestResult(1, "fixpnt<16,1> == 0.0", "== double literal");
Expand All @@ -103,10 +103,10 @@ try {
}
#if LONG_DOUBLE_SUPPORT
if (!(a == 0.0l)) {
nrOfFailedTestCases += ReportTestResult(1, "fixpnt<16,1> == 0.0", "== long double literal");
nrOfFailedTestCases += ReportTestResult(1, "fixpnt<16,1> == 0.0l", "== long double literal");
}
else {
ReportTestResult(0, "fixpnt<16,1> == 0.0", "== long double literal");
ReportTestResult(0, "fixpnt<16,1> == 0.0l", "== long double literal");
}
#endif

Expand Down Expand Up @@ -136,10 +136,10 @@ try {
ReportTestResult(0, "fixpnt<16,1> != 0", "!= int literal");
}
if (a != 0.0f) {
nrOfFailedTestCases += ReportTestResult(1, "fixpnt<16,1> != 0.0", "!= float literal");
nrOfFailedTestCases += ReportTestResult(1, "fixpnt<16,1> != 0.0f", "!= float literal");
}
else {
ReportTestResult(0, "fixpnt<16,1> != 0.0", "!= float literal");
ReportTestResult(0, "fixpnt<16,1> != 0.0f", "!= float literal");
}
if (a != 0.0) {
nrOfFailedTestCases += ReportTestResult(1, "fixpnt<16,1> != 0.0", "!= double literal");
Expand All @@ -149,10 +149,10 @@ try {
}
#if LONG_DOUBLE_SUPPORT
if (a != 0.0l) {
nrOfFailedTestCases += ReportTestResult(1, "fixpnt<16,1> != 0.0", "!= long double literal");
nrOfFailedTestCases += ReportTestResult(1, "fixpnt<16,1> != 0.0l", "!= long double literal");
}
else {
ReportTestResult(0, "fixpnt<16,1> != 0.0", "!= long double literal");
ReportTestResult(0, "fixpnt<16,1> != 0.0l", "!= long double literal");
}
#endif

Expand Down Expand Up @@ -182,10 +182,10 @@ try {
ReportTestResult(0, "fixpnt<16,1> < 0", "< int literal");
}
if (a < 0.0f) {
nrOfFailedTestCases += ReportTestResult(1, "fixpnt<16,1> < 0.0", "< float literal");
nrOfFailedTestCases += ReportTestResult(1, "fixpnt<16,1> < 0.0f", "< float literal");
}
else {
ReportTestResult(0, "fixpnt<16,1> < 0.0", "< float literal");
ReportTestResult(0, "fixpnt<16,1> < 0.0f", "< float literal");
}
if (a < 0.0) {
nrOfFailedTestCases += ReportTestResult(1, "fixpnt<16,1> < 0.0", "< double literal");
Expand All @@ -195,10 +195,10 @@ try {
}
#if LONG_DOUBLE_SUPPORT
if (a < 0.0l) {
nrOfFailedTestCases += ReportTestResult(1, "fixpnt<16,1> < 0.0", "< long double literal");
nrOfFailedTestCases += ReportTestResult(1, "fixpnt<16,1> < 0.0l", "< long double literal");
}
else {
ReportTestResult(0, "fixpnt<16,1> < 0.0", "< long double literal");
ReportTestResult(0, "fixpnt<16,1> < 0.0l", "< long double literal");
}
#endif

Expand Down Expand Up @@ -228,10 +228,10 @@ try {
ReportTestResult(0, "fixpnt<16,1> <= 0", "<= int literal");
}
if (!(a <= 0.0f)) {
nrOfFailedTestCases += ReportTestResult(1, "fixpnt<16,1> <= 0.0", "<= float literal");
nrOfFailedTestCases += ReportTestResult(1, "fixpnt<16,1> <= 0.0f", "<= float literal");
}
else {
ReportTestResult(0, "fixpnt<16,1> <= 0.0", "<= float literal");
ReportTestResult(0, "fixpnt<16,1> <= 0.0f", "<= float literal");
}
if (!(a <= 0.0)) {
nrOfFailedTestCases += ReportTestResult(1, "fixpnt<16,1> <= 0.0", "<= double literal");
Expand All @@ -241,10 +241,10 @@ try {
}
#if LONG_DOUBLE_SUPPORT
if (!(a <= 0.0l)) {
nrOfFailedTestCases += ReportTestResult(1, "fixpnt<16,1> <= 0.0", "<= long double literal");
nrOfFailedTestCases += ReportTestResult(1, "fixpnt<16,1> <= 0.0l", "<= long double literal");
}
else {
ReportTestResult(0, "fixpnt<16,1> <= 0.0", "<= long double literal");
ReportTestResult(0, "fixpnt<16,1> <= 0.0l", "<= long double literal");
}
#endif

Expand Down Expand Up @@ -274,10 +274,10 @@ try {
ReportTestResult(0, "fixpnt<16,1> > 0", "> int literal");
}
if (a > 0.0f) {
nrOfFailedTestCases += ReportTestResult(1, "fixpnt<16,1> > 0.0", "> float literal");
nrOfFailedTestCases += ReportTestResult(1, "fixpnt<16,1> > 0.0f", "> float literal");
}
else {
ReportTestResult(0, "fixpnt<16,1> > 0.0", "> float literal");
ReportTestResult(0, "fixpnt<16,1> > 0.0f", "> float literal");
}
if (a > 0.0) {
nrOfFailedTestCases += ReportTestResult(1, "fixpnt<16,1> > 0.0", "> double literal");
Expand All @@ -287,10 +287,10 @@ try {
}
#if LONG_DOUBLE_SUPPORT
if (a > 0.0l) {
nrOfFailedTestCases += ReportTestResult(1, "fixpnt<16,1> > 0.0", "> long double literal");
nrOfFailedTestCases += ReportTestResult(1, "fixpnt<16,1> > 0.0l", "> long double literal");
}
else {
ReportTestResult(0, "fixpnt<16,1> > 0.0", "> long double literal");
ReportTestResult(0, "fixpnt<16,1> > 0.0l", "> long double literal");
}
#endif

Expand Down Expand Up @@ -320,10 +320,10 @@ try {
ReportTestResult(0, "fixpnt<16,1> >= 0", ">= int literal");
}
if (!(a >= 0.0f)) {
nrOfFailedTestCases += ReportTestResult(1, "fixpnt<16,1> >= 0.0", ">= float literal");
nrOfFailedTestCases += ReportTestResult(1, "fixpnt<16,1> >= 0.0f", ">= float literal");
}
else {
ReportTestResult(0, "fixpnt<16,1> >= 0.0", ">= float literal");
ReportTestResult(0, "fixpnt<16,1> >= 0.0f", ">= float literal");
}
if (!(a >= 0.0)) {
nrOfFailedTestCases += ReportTestResult(1, "fixpnt<16,1> >= 0.0", ">= double literal");
Expand All @@ -333,10 +333,10 @@ try {
}
#if LONG_DOUBLE_SUPPORT
if (!(a >= 0.0l)) {
nrOfFailedTestCases += ReportTestResult(1, "fixpnt<16,1> >= 0.0", ">= long double literal");
nrOfFailedTestCases += ReportTestResult(1, "fixpnt<16,1> >= 0.0l", ">= long double literal");
}
else {
ReportTestResult(0, "fixpnt<16,1> >= 0.0", ">= long double literal");
ReportTestResult(0, "fixpnt<16,1> >= 0.0l", ">= long double literal");
}
#endif

Expand Down

0 comments on commit b503195

Please sign in to comment.