From fd21e8f56f4ceeb6caa452730a9cd0279e9fc7d9 Mon Sep 17 00:00:00 2001 From: "mstarzinger@chromium.org" Date: Wed, 28 May 2014 09:52:38 +0000 Subject: [PATCH] Add Seq[One,Two]ByteString to runtime test generator. R=dcarney@chromium.org, jkummerow@chromium.org Review URL: https://codereview.chromium.org/303543006 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21557 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- tools/generate-runtime-tests.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/generate-runtime-tests.py b/tools/generate-runtime-tests.py index c5bbeaea4..7325f8545 100755 --- a/tools/generate-runtime-tests.py +++ b/tools/generate-runtime-tests.py @@ -288,6 +288,12 @@ class Generator(object): # 'foo' + 'bar' return self._Variable(name, "\"%s\" + \"%s\"" % (s1, s2)) + def _SeqTwoByteString(self, name): + s1 = self._RawRandomString(1, 5) + s2 = self._RawRandomString(1, 5) + # 'foo' + unicode + 'bar' + return self._Variable(name, "\"%s\" + \"\\2082\" + \"%s\"" % (s1, s2)) + def _SlicedString(self, name): s = self._RawRandomString(20, 30) # 'ffoo12345678901234567890'.substr(1) @@ -674,7 +680,9 @@ class Generator(object): "Number": ["1.5", _Number], "Object": ["new Object()", _Object], "PropertyDetails": ["513", _PropertyDetails], + "SeqOneByteString": ["\"seq 1-byte\"", _SeqString], "SeqString": ["\"seqstring\"", _SeqString], + "SeqTwoByteString": ["\"seq \\u2082-byte\"", _SeqTwoByteString], "Smi": ["1", _Smi], "StrictMode": ["1", _StrictMode], "String": ["\"foo\"", _String], -- 2.34.1