OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | |
2 // for details. All rights reserved. Use of this source code is governed by a | |
3 // BSD-style license that can be found in the LICENSE file. | |
4 | |
5 import "package:expect/expect.dart"; | |
6 | |
7 void testOneByteSting() { | |
8 // Compare one-byte-string toLowerCase with a two-byte-string toLowerCase. | |
9 var oneByteString = new String.fromCharCodes( | |
10 new List.generate(256, (i)=> i)); | |
11 var twoByteString = new String.fromCharCodes( | |
sra1
2014/03/25 21:29:13
This is probably a _OneByteString.
You have to do
Anders Johnsen
2014/03/25 21:37:48
Done.
| |
12 new List.generate(512, (i)=> i)).substring(0, 256); | |
13 Expect.listEquals(oneByteString.toLowerCase(), twoByteString.toLowerCase()); | |
sra1
2014/03/25 21:29:13
Expect.equals.
(This will fail in checked mode si
Anders Johnsen
2014/03/25 21:37:48
Done.
| |
14 } | |
15 | |
16 void main() { | |
17 testOneByteSting(); | |
18 } | |
OLD | NEW |