Skip to content

Commit

Permalink
Corrected missing implicit test lost after modernization corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
shajder committed Jun 20, 2023
1 parent 616ef76 commit ebea247
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions test_conformance/conversions/basic_test_conversions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -450,12 +450,12 @@ cl_int ConversionsTest::SetUp(int elements)

template <typename InType, typename OutType>
void ConversionsTest::TestTypesConversion(const Type &inType,
const Type &outType, int &testNumber)
const Type &outType, int &testNumber,
int startMinVectorSize)
{
SaturationMode sat;
RoundingMode round;
int error;
int startMinVectorSize = gMinVectorSize;

// skip longs on embedded
if (!gHasLong
Expand Down
16 changes: 10 additions & 6 deletions test_conformance/conversions/basic_test_conversions.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,8 @@ struct ConversionsTest
RoundingMode round);

template <typename InType, typename OutType>
void TestTypesConversion(const Type &inType, const Type &outType, int &tn);
void TestTypesConversion(const Type &inType, const Type &outType, int &tn,
const int smvs);

protected:
cl_context context;
Expand Down Expand Up @@ -244,7 +245,7 @@ struct IterOverTypes : public TestType
{
IterOverTypes(const TypeIter &typeIter, ConversionsTest &test)
: inType((Type)0), outType((Type)0), typeIter(typeIter), test(test),
testNumber(-1)
testNumber(-1), startMinVectorSize(gMinVectorSize)
{}

void Run() { for_each_out_elem(typeIter); }
Expand All @@ -267,7 +268,8 @@ struct IterOverTypes : public TestType
if (!testType<OutType>(outType)) vlog_error("Unexpected data type!\n");

// run the conversions
test.TestTypesConversion<InType, OutType>(inType, outType, testNumber);
test.TestTypesConversion<InType, OutType>(inType, outType, testNumber,
startMinVectorSize);
inType = (Type)(inType + 1);
}

Expand Down Expand Up @@ -307,6 +309,7 @@ struct IterOverTypes : public TestType
const TypeIter &typeIter;
ConversionsTest &test;
int testNumber;
int startMinVectorSize;
};


Expand All @@ -316,7 +319,7 @@ struct IterOverSelectedTypes : public TestType
IterOverSelectedTypes(const TypeIter &typeIter, ConversionsTest &test,
const Type &in, const Type &out)
: inType(in), outType(out), typeIter(typeIter), test(test),
testNumber(-1)
testNumber(-1), startMinVectorSize(gMinVectorSize)
{}

void Run() { for_each_out_elem(typeIter); }
Expand All @@ -335,8 +338,8 @@ struct IterOverSelectedTypes : public TestType
if (testType<InType>(inType) && testType<OutType>(outType))
{
// run the conversions
test.TestTypesConversion<InType, OutType>(inType, outType,
testNumber);
test.TestTypesConversion<InType, OutType>(
inType, outType, testNumber, startMinVectorSize);
}
}

Expand Down Expand Up @@ -374,6 +377,7 @@ struct IterOverSelectedTypes : public TestType
const TypeIter &typeIter;
ConversionsTest &test;
int testNumber;
int startMinVectorSize;
};


Expand Down

0 comments on commit ebea247

Please sign in to comment.