diff --git a/cartofacade/capi_test.go b/cartofacade/capi_test.go index 4021268e..59505fe6 100644 --- a/cartofacade/capi_test.go +++ b/cartofacade/capi_test.go @@ -38,7 +38,7 @@ func confirmBinaryCompressedUnsupported(t *testing.T) { test.That(t, err.Error(), test.ShouldResemble, "compressed PCD not yet implemented") } -func testAddSensorReading(t *testing.T, vc Carto, sensor, pcdPath string, timestamp time.Time, pcdType pointcloud.PCDType) { +func testAddSensorReading(t *testing.T, vc Carto, pcdPath string, timestamp time.Time, pcdType pointcloud.PCDType) { file, err := os.Open(artifact.MustPath(pcdPath)) test.That(t, err, test.ShouldBeNil) @@ -49,7 +49,7 @@ func testAddSensorReading(t *testing.T, vc Carto, sensor, pcdPath string, timest err = pointcloud.ToPCD(pc, buf, pcdType) test.That(t, err, test.ShouldBeNil) - err = vc.addSensorReading(sensor, buf.Bytes(), timestamp) + err = vc.addSensorReading("mysensor", buf.Bytes(), timestamp) test.That(t, err, test.ShouldBeNil) } @@ -194,7 +194,7 @@ func TestCGoAPI(t *testing.T) { // 1. test valid addSensorReading: valid reading ascii t.Log("sensor reading 1") timestamp = timestamp.Add(time.Second * 2) - testAddSensorReading(t, vc, "mysensor", "viam-cartographer/mock_lidar/0.pcd", timestamp, pointcloud.PCDAscii) + testAddSensorReading(t, vc, "viam-cartographer/mock_lidar/0.pcd", timestamp, pointcloud.PCDAscii) // test getPosition zeroed if not enough sensor data has been provided position, err := vc.getPosition() @@ -217,7 +217,7 @@ func TestCGoAPI(t *testing.T) { // 2. test valid addSensorReading: valid reading binary t.Log("sensor reading 2") timestamp = timestamp.Add(time.Second * 2) - testAddSensorReading(t, vc, "mysensor", "viam-cartographer/mock_lidar/1.pcd", timestamp, pointcloud.PCDBinary) + testAddSensorReading(t, vc, "viam-cartographer/mock_lidar/1.pcd", timestamp, pointcloud.PCDBinary) // test getPosition zeroed position, err = vc.getPosition() @@ -236,7 +236,7 @@ func TestCGoAPI(t *testing.T) { // third sensor reading populates the pointcloud map and the position t.Log("sensor reading 3") timestamp = timestamp.Add(time.Second * 2) - testAddSensorReading(t, vc, "mysensor", "viam-cartographer/mock_lidar/2.pcd", timestamp, pointcloud.PCDBinary) + testAddSensorReading(t, vc, "viam-cartographer/mock_lidar/2.pcd", timestamp, pointcloud.PCDBinary) // test getPosition, is no longer zeroed position, err = vc.getPosition() @@ -259,7 +259,7 @@ func TestCGoAPI(t *testing.T) { // third sensor reading populates the pointcloud map and the position t.Log("sensor reading 3") timestamp = timestamp.Add(time.Second * 2) - testAddSensorReading(t, vc, "mysensor", "viam-cartographer/mock_lidar/2.pcd", timestamp, pointcloud.PCDBinary) + testAddSensorReading(t, vc, "viam-cartographer/mock_lidar/2.pcd", timestamp, pointcloud.PCDBinary) // test getPosition, is no longer zeroed position, err = vc.getPosition()