(t *testing.T)
| 41 | } |
| 42 | |
| 43 | func TestArrayCircularReferenceConcat(t *testing.T) { |
| 44 | const SCRIPT = ` |
| 45 | var T = [1, 2, 3]; |
| 46 | T[42] = T; // Create circular reference |
| 47 | var str = '' + T; // String concatenation |
| 48 | // Circular reference should be replaced with empty string |
| 49 | str === "1,2,3,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"; |
| 50 | ` |
| 51 | testScript(SCRIPT, valueTrue, t) |
| 52 | } |
| 53 | |
| 54 | func TestArrayCircularReferenceToLocaleString(t *testing.T) { |
| 55 | const SCRIPT = ` |
nothing calls this directly
no test coverage detected
searching dependent graphs…