• Home
  • Raw
  • Download

Lines Matching refs:Frequency

19   constexpr Frequency kFrequencyZero = Frequency::Zero();  in TEST()
20 constexpr Frequency kFrequencyPlusInf = Frequency::PlusInfinity(); in TEST()
21 constexpr Frequency kFrequencyMinusInf = Frequency::MinusInfinity(); in TEST()
31 EXPECT_EQ(Frequency::Hertz(kValue).hertz<int64_t>(), kValue); in TEST()
32 EXPECT_EQ(Frequency::Zero().hertz<int64_t>(), 0); in TEST()
37 EXPECT_EQ(Frequency::MilliHertz(kValue).hertz<int64_t>(), kValue / 1000); in TEST()
38 EXPECT_EQ(Frequency::Hertz(kValue).millihertz(), kValue * 1000); in TEST()
39 EXPECT_EQ(Frequency::KiloHertz(kValue).hertz(), kValue * 1000); in TEST()
44 EXPECT_TRUE(Frequency::Zero().IsZero()); in TEST()
45 EXPECT_FALSE(Frequency::Hertz(kValue).IsZero()); in TEST()
47 EXPECT_TRUE(Frequency::PlusInfinity().IsInfinite()); in TEST()
48 EXPECT_TRUE(Frequency::MinusInfinity().IsInfinite()); in TEST()
49 EXPECT_FALSE(Frequency::Zero().IsInfinite()); in TEST()
50 EXPECT_FALSE(Frequency::Hertz(kValue).IsInfinite()); in TEST()
52 EXPECT_FALSE(Frequency::PlusInfinity().IsFinite()); in TEST()
53 EXPECT_FALSE(Frequency::MinusInfinity().IsFinite()); in TEST()
54 EXPECT_TRUE(Frequency::Hertz(kValue).IsFinite()); in TEST()
55 EXPECT_TRUE(Frequency::Zero().IsFinite()); in TEST()
57 EXPECT_TRUE(Frequency::PlusInfinity().IsPlusInfinity()); in TEST()
58 EXPECT_FALSE(Frequency::MinusInfinity().IsPlusInfinity()); in TEST()
60 EXPECT_TRUE(Frequency::MinusInfinity().IsMinusInfinity()); in TEST()
61 EXPECT_FALSE(Frequency::PlusInfinity().IsMinusInfinity()); in TEST()
67 const Frequency small = Frequency::Hertz(kSmall); in TEST()
68 const Frequency large = Frequency::Hertz(kLarge); in TEST()
70 EXPECT_EQ(Frequency::Zero(), Frequency::Hertz(0)); in TEST()
71 EXPECT_EQ(Frequency::PlusInfinity(), Frequency::PlusInfinity()); in TEST()
72 EXPECT_EQ(small, Frequency::Hertz(kSmall)); in TEST()
73 EXPECT_LE(small, Frequency::Hertz(kSmall)); in TEST()
74 EXPECT_GE(small, Frequency::Hertz(kSmall)); in TEST()
75 EXPECT_NE(small, Frequency::Hertz(kLarge)); in TEST()
76 EXPECT_LE(small, Frequency::Hertz(kLarge)); in TEST()
77 EXPECT_LT(small, Frequency::Hertz(kLarge)); in TEST()
78 EXPECT_GE(large, Frequency::Hertz(kSmall)); in TEST()
79 EXPECT_GT(large, Frequency::Hertz(kSmall)); in TEST()
80 EXPECT_LT(Frequency::Zero(), small); in TEST()
82 EXPECT_GT(Frequency::PlusInfinity(), large); in TEST()
83 EXPECT_LT(Frequency::MinusInfinity(), Frequency::Zero()); in TEST()
87 const Frequency upper = Frequency::Hertz(800); in TEST()
88 const Frequency lower = Frequency::Hertz(100); in TEST()
89 const Frequency under = Frequency::Hertz(100); in TEST()
90 const Frequency inside = Frequency::Hertz(500); in TEST()
91 const Frequency over = Frequency::Hertz(1000); in TEST()
96 Frequency mutable_frequency = lower; in TEST()
110 const Frequency frequency_a = Frequency::Hertz(kValueA); in TEST()
111 const Frequency frequency_b = Frequency::Hertz(kValueB); in TEST()
115 EXPECT_EQ((Frequency::Hertz(kValueA) * kValueB).hertz<int64_t>(), in TEST()
121 Frequency mutable_frequency = Frequency::Hertz(kValueA); in TEST()
122 mutable_frequency += Frequency::Hertz(kValueB); in TEST()
123 EXPECT_EQ(mutable_frequency, Frequency::Hertz(kValueA + kValueB)); in TEST()
124 mutable_frequency -= Frequency::Hertz(kValueB); in TEST()
125 EXPECT_EQ(mutable_frequency, Frequency::Hertz(kValueA)); in TEST()
128 const Frequency freq_high = Frequency::Hertz(23.976); in TEST()
130 EXPECT_EQ(freq_high.RoundDownTo(Frequency::Hertz(1)), Frequency::Hertz(23)); in TEST()
131 EXPECT_EQ(freq_high.RoundTo(Frequency::Hertz(1)), Frequency::Hertz(24)); in TEST()
132 EXPECT_EQ(freq_high.RoundUpTo(Frequency::Hertz(1)), Frequency::Hertz(24)); in TEST()
134 const Frequency freq_low = Frequency::Hertz(23.4); in TEST()
136 EXPECT_EQ(freq_low.RoundDownTo(Frequency::Hertz(1)), Frequency::Hertz(23)); in TEST()
137 EXPECT_EQ(freq_low.RoundTo(Frequency::Hertz(1)), Frequency::Hertz(23)); in TEST()
138 EXPECT_EQ(freq_low.RoundUpTo(Frequency::Hertz(1)), Frequency::Hertz(24)); in TEST()
143 const Frequency finite = Frequency::Hertz(kValue); in TEST()
144 EXPECT_TRUE((Frequency::PlusInfinity() + finite).IsPlusInfinity()); in TEST()
145 EXPECT_TRUE((Frequency::PlusInfinity() - finite).IsPlusInfinity()); in TEST()
146 EXPECT_TRUE((finite + Frequency::PlusInfinity()).IsPlusInfinity()); in TEST()
147 EXPECT_TRUE((finite - Frequency::MinusInfinity()).IsPlusInfinity()); in TEST()
149 EXPECT_TRUE((Frequency::MinusInfinity() + finite).IsMinusInfinity()); in TEST()
150 EXPECT_TRUE((Frequency::MinusInfinity() - finite).IsMinusInfinity()); in TEST()
151 EXPECT_TRUE((finite + Frequency::MinusInfinity()).IsMinusInfinity()); in TEST()
152 EXPECT_TRUE((finite - Frequency::PlusInfinity()).IsMinusInfinity()); in TEST()
156 EXPECT_EQ(1 / Frequency::Hertz(50), TimeDelta::Millis(20)); in TEST()
157 EXPECT_EQ(1 / TimeDelta::Millis(20), Frequency::Hertz(50)); in TEST()
158 EXPECT_EQ(Frequency::KiloHertz(200) * TimeDelta::Millis(2), 400.0); in TEST()