Browse Source

Merge remote-tracking branch 'origin/master'

HeWang 6 tháng trước cách đây
mục cha
commit
c5dff1763e
1 tập tin đã thay đổi với 5 bổ sung2 xóa
  1. 5 2
      test/rosbag_write_test.go

+ 5 - 2
test/rosbag_write_test.go

@@ -2,9 +2,10 @@ package test
 
 import (
 	"fmt"
-	"github.com/foxglove/go-rosbag"
 	"os"
 	"testing"
+
+	"github.com/foxglove/go-rosbag"
 )
 
 func TestWriteRosBag(t *testing.T) {
@@ -45,14 +46,16 @@ func TestWriteRosBag(t *testing.T) {
 	}
 
 	for i := 0; i < 100; i++ {
+		data := "hello"
 		err = writer.WriteMessage(&rosbag.Message{
 			Conn: 0,
 			Time: uint64(i),
-			Data: []byte("hello"),
+			Data: []byte(data),
 		})
 		if err != nil {
 			panic(err)
 		}
+		fmt.Println("保存数据", data)
 	}
 
 }