1 // Copyright 2015 the V8 project authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 function Stringified(toString) { 6 var valueOf = "-" + toString + "-"; 7 return { 8 toString: function() { return toString; }, 9 valueOf: function() { return valueOf; } 10 }; 11 } 12 13 assertEquals("a.b.", "a.".concat(Stringified("b."))); 14 assertEquals("a.b.c.", "a.".concat(Stringified("b."), Stringified("c."))); 15