(t *testing.T)
| 27 | ) |
| 28 | |
| 29 | func TestBuildFQName(t *testing.T) { |
| 30 | scenarios := []struct{ namespace, subsystem, name, result string }{ |
| 31 | {"a", "b", "c", "a_b_c"}, |
| 32 | {"", "b", "c", "b_c"}, |
| 33 | {"a", "", "c", "a_c"}, |
| 34 | {"", "", "c", "c"}, |
| 35 | {"a", "b", "", ""}, |
| 36 | {"a", "", "", ""}, |
| 37 | {"", "b", "", ""}, |
| 38 | {" ", "", "", ""}, |
| 39 | } |
| 40 | |
| 41 | for i, s := range scenarios { |
| 42 | if want, got := s.result, BuildFQName(s.namespace, s.subsystem, s.name); want != got { |
| 43 | t.Errorf("%d. want %s, got %s", i, want, got) |
| 44 | } |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | func TestWithExemplarsMetric(t *testing.T) { |
| 49 | t.Run("histogram", func(t *testing.T) { |
nothing calls this directly
no test coverage detected