(val any)
| 1115 | } |
| 1116 | |
| 1117 | func testName(val any) string { |
| 1118 | if val == nil { |
| 1119 | return "nil" |
| 1120 | } |
| 1121 | |
| 1122 | switch v := val.(type) { |
| 1123 | case float64: |
| 1124 | return fmt.Sprintf("%e", v) |
| 1125 | case []int: |
| 1126 | return fmt.Sprintf("[%d]int", len(v)) |
| 1127 | case []float64: |
| 1128 | return fmt.Sprintf("[%d]float", len(v)) |
| 1129 | case []string: |
| 1130 | return fmt.Sprintf("[%d]str", len(v)) |
| 1131 | case []bool: |
| 1132 | return fmt.Sprintf("[%d]bool", len(v)) |
| 1133 | case Static: |
| 1134 | return v.EncodeToString(false) |
| 1135 | default: |
| 1136 | return fmt.Sprintf("%v", v) |
| 1137 | } |
| 1138 | } |
| 1139 | |
| 1140 | func TestNeedsFullTrace(t *testing.T) { |
| 1141 | dontNeedFullTrace := []string{ |
no test coverage detected