mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2025-01-13 18:00:05 +00:00
Fixed float->int16 conversion warnings in VS2013.
This commit is contained in:
parent
f7e63786a9
commit
9dd1cd7f31
@ -1092,7 +1092,7 @@ using ParseNormalFloat16Test =
|
||||
|
||||
TEST_P(ParseNormalFloat16Test, Samples) {
|
||||
std::stringstream input(GetParam().literal);
|
||||
HexFloat<FloatProxy<Float16>> parsed_value(0.0f);
|
||||
HexFloat<FloatProxy<Float16>> parsed_value(0);
|
||||
ParseNormalFloat(input, GetParam().negate_value, parsed_value);
|
||||
EXPECT_NE(GetParam().expect_success, input.fail())
|
||||
<< " literal: " << GetParam().literal
|
||||
|
@ -513,7 +513,7 @@ TEST(AssemblyContextParseFloat16, Overflow) {
|
||||
// on floating point.
|
||||
AssemblyContext context(AutoText(""), nullptr);
|
||||
const spv_result_t ec = SPV_FAILED_MATCH;
|
||||
spvutils::HexFloat<spvutils::FloatProxy<spvutils::Float16>> f(0.0f);
|
||||
spvutils::HexFloat<spvutils::FloatProxy<spvutils::Float16>> f(0);
|
||||
|
||||
EXPECT_EQ(SPV_SUCCESS, context.parseNumber("-0.0", ec, &f, ""));
|
||||
EXPECT_EQ(uint16_t{0x8000}, f.value().getAsFloat().get_value());
|
||||
|
Loading…
Reference in New Issue
Block a user