examples/composition/note_duration_test.cpp
// Tests that the position gets quantized as expected with respect to the given
// resolution.
Tests that the position gets quantized as expected with respect to the given
resolution.
Tests that the position gets quantized as expected with respect to the given resolution .
TEST_P(PositionTest, QuantizePosition) {
  const double kPosition = 0.99;
  const double resolution = 1.0 / static_cast<double>(GetParam());
  EXPECT_DOUBLE_EQ(QuantizePosition(kPosition, resolution), 1.0);
  EXPECT_DOUBLE_EQ(QuantizePosition(1.0 - kPosition, resolution), 0.0);
}
TEST_P ( PositionTest , QuantizePosition ) { const double kPosition = 0.99 ; const double resolution = 1.0 / static_cast < double > ( GetParam ( ) ) ; EXPECT_DOUBLE_EQ ( QuantizePosition ( kPosition , resolution ) , 1.0 ) ; EXPECT_DOUBLE_EQ ( QuantizePosition ( 1.0 - kPosition , resolution ) , 0.0 ) ; }
Tests that the position gets quantized as expected with respect to the given
resolution.
Tests that the position gets quantized as expected with respect to the given resolution .