From ce09abd53771d9893ba582237fd2d4bf47375e46 Mon Sep 17 00:00:00 2001 From: Paul Wells Date: Wed, 5 Jun 2024 17:38:02 -0700 Subject: [PATCH] cleanup --- utils/id_test.go | 42 ------------------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 utils/id_test.go diff --git a/utils/id_test.go b/utils/id_test.go deleted file mode 100644 index 9a15c3d4..00000000 --- a/utils/id_test.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2023 LiveKit, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package utils - -import ( - "testing" - - "github.com/stretchr/testify/require" - - "github.com/livekit/protocol/livekit" -) - -func TestMarshalUnmarshalGuid(t *testing.T) { - id0 := livekit.TrackID(NewGuid(TrackPrefix)) - b0 := MarshalGuid(id0) - id1 := UnmarshalGuid[livekit.TrackID](b0) - b1 := MarshalGuid(id1) - require.EqualValues(t, id0, id1) - require.EqualValues(t, b0, b1) -} - -func BenchmarkNewGuid(b *testing.B) { - b.Run("new", func(b *testing.B) { - var guid string - for i := 0; i < b.N; i++ { - guid = NewGuid(TrackPrefix) - } - _ = guid - }) -}