FakeSensorManagerAndroid() { }
virtual ~FakeSensorManagerAndroid() { }
- virtual int GetNumberActiveDeviceMotionSensors() OVERRIDE {
+ virtual int GetNumberActiveDeviceMotionSensors() override {
return number_active_sensors_;
}
}
protected:
- virtual bool Start(EventType event_type) OVERRIDE {
+ virtual bool Start(EventType event_type) override {
return true;
}
- virtual void Stop(EventType event_type) OVERRIDE {
+ virtual void Stop(EventType event_type) override {
}
private:
ASSERT_TRUE(motion_buffer_->data.hasRotationRateBeta);
ASSERT_EQ(9, motion_buffer_->data.rotationRateGamma);
ASSERT_TRUE(motion_buffer_->data.hasRotationRateGamma);
- ASSERT_EQ(kInertialSensorIntervalMillis, motion_buffer_->data.interval);
+ ASSERT_EQ(kInertialSensorIntervalMicroseconds / 1000.,
+ motion_buffer_->data.interval);
sensorManager.StopFetchingDeviceMotionData();
ASSERT_FALSE(motion_buffer_->data.allAvailableSensorsAreActive);
sensorManager.GotAccelerationIncludingGravity(0, 0, 1, 2, 3);
ASSERT_TRUE(motion_buffer_->data.allAvailableSensorsAreActive);
- ASSERT_EQ(kInertialSensorIntervalMillis, motion_buffer_->data.interval);
+ ASSERT_EQ(kInertialSensorIntervalMicroseconds / 1000.,
+ motion_buffer_->data.interval);
sensorManager.StopFetchingDeviceMotionData();
ASSERT_FALSE(motion_buffer_->data.allAvailableSensorsAreActive);
sensorManager.StartFetchingDeviceMotionData(motion_buffer_.get());
ASSERT_TRUE(motion_buffer_->data.allAvailableSensorsAreActive);
- ASSERT_EQ(kInertialSensorIntervalMillis, motion_buffer_->data.interval);
+ ASSERT_EQ(kInertialSensorIntervalMicroseconds / 1000.,
+ motion_buffer_->data.interval);
sensorManager.StopFetchingDeviceMotionData();
ASSERT_FALSE(motion_buffer_->data.allAvailableSensorsAreActive);