File: common_test.go

package info (click to toggle)
golang-github-pion-rtp 1.7.13-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bookworm-backports, forky, sid, trixie
  • size: 472 kB
  • sloc: makefile: 2
file content (22 lines) | stat: -rw-r--r-- 267 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package codecs

import (
	"testing"
)

func TestCommon_Min(t *testing.T) {
	res := min(1, -1)
	if res != -1 {
		t.Fatal("Error: -1 < 1")
	}

	res = min(1, 2)
	if res != 1 {
		t.Fatal("Error: 1 < 2")
	}

	res = min(3, 3)
	if res != 3 {
		t.Fatal("Error: 3 == 3")
	}
}