Skip to content

Commit 661baa7

Browse files
sorensenjsagutkin
authored andcommitted
Use explicit weight for test comparison.
PiperOrigin-RevId: 879196740
1 parent dcc24d4 commit 661baa7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

openfst/test/power-weight-mappers_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ TYPED_TEST_SUITE(FromPowerWeightMapperTest, PowerWeightTypes);
6969
TYPED_TEST(FromPowerWeightMapperTest, TropicalWeight) {
7070
using FromWeight = typename TestFixture::FromWeight;
7171
const FromWeight w = CreateWeight<FromWeight>({{0, 1.23}, {2, 2.34}});
72-
EXPECT_EQ(1.23, typename TestFixture::Mapper()(w));
72+
EXPECT_EQ(TropicalWeight(1.23), typename TestFixture::Mapper()(w));
7373
}
7474

7575
TYPED_TEST(FromPowerWeightMapperTest, TropicalWeightWithIndex) {
7676
using FromWeight = typename TestFixture::FromWeight;
7777
const FromWeight w = CreateWeight<FromWeight>({{0, 1.23}, {2, 2.34}});
78-
EXPECT_EQ(2.34, typename TestFixture::Mapper(2)(w));
78+
EXPECT_EQ(TropicalWeight(2.34), typename TestFixture::Mapper(2)(w));
7979
}
8080

8181
TYPED_TEST(FromPowerWeightMapperTest, TropicalWeightDefault) {

0 commit comments

Comments
 (0)