about summary refs log tree commit diff
path: root/main/additions/additions_test.go
blob: d62bc68982ecc15cfcba8386f9e989de728f0c81 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package main

import (
	"os"
	"testing"

	"ci-visibility-test-github/main/civisibility/integrations/gotesting"
)

func TestMain(m *testing.M) {
	// NOTE: This is the only needed thing to enable test visibility instrumentation.
	os.Exit(gotesting.RunM(m))
}

func Test_AddNumbers(t *testing.T) {
	ans := addNumbers(2, 5)

	if ans != 7 {
		t.Fatal("Expected 7 but instead got ", ans)
	}
}

func Test_AddNumbers2(t *testing.T) {
	ans := addNumbers(7, 5)

	if ans != 12 {
		t.Fatal("Expected 12 but instead got ", ans)
	}
}