| 1 |
/* |
| 2 |
Copyright 2015 Google Inc. All rights reserved. |
| 3 |
|
| 4 |
Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 |
you may not use this file except in compliance with the License. |
| 6 |
You may obtain a copy of the License at |
| 7 |
|
| 8 |
http://www.apache.org/licenses/LICENSE-2.0 |
| 9 |
|
| 10 |
Unless required by applicable law or agreed to in writing, software |
| 11 |
distributed under the License is distributed on an "AS IS" BASIS, |
| 12 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 |
See the License for the specific language governing permissions and |
| 14 |
limitations under the License. |
| 15 |
*/ |
| 16 |
|
| 17 |
std.assertEqual('foo', 'foo') && |
| 18 |
std.assertEqual('foo' == 'foo', true) && |
| 19 |
std.assertEqual('foo' != 'bar', true) && |
| 20 |
std.assertEqual('foo' != 'foo', false) && |
| 21 |
std.assertEqual('foo' == 'bar', false) && |
| 22 |
std.assertEqual('foo' + 'bar', 'foobar') && |
| 23 |
|
| 24 |
std.assertEqual('foo' + true, 'footrue') && |
| 25 |
std.assertEqual('foo' + false, 'foofalse') && |
| 26 |
std.assertEqual('foo' + 0, 'foo0') && |
| 27 |
std.assertEqual('foo' + null, 'foonull') && |
| 28 |
|
| 29 |
std.assertEqual(true + 'foo', 'truefoo') && |
| 30 |
std.assertEqual(false + 'foo', 'falsefoo') && |
| 31 |
std.assertEqual(0 + 'foo', '0foo') && |
| 32 |
std.assertEqual(null + 'foo', 'nullfoo') && |
| 33 |
|
| 34 |
std.assertEqual('foo' < 'bar', false) && |
| 35 |
std.assertEqual('foo' <= 'bar', false) && |
| 36 |
std.assertEqual('bar' < 'foo', true) && |
| 37 |
std.assertEqual('bar' <= 'foo', true) && |
| 38 |
std.assertEqual('foo' > 'bar', true) && |
| 39 |
std.assertEqual('foo' >= 'bar', true) && |
| 40 |
std.assertEqual('bar' > 'foo', false) && |
| 41 |
std.assertEqual('bar' >= 'foo', false) && |
| 42 |
std.assertEqual('afoo' < 'abar', false) && |
| 43 |
std.assertEqual('afoo' <= 'abar', false) && |
| 44 |
std.assertEqual('abar' < 'afoo', true) && |
| 45 |
std.assertEqual('abar' <= 'afoo', true) && |
| 46 |
std.assertEqual('afoo' > 'abar', true) && |
| 47 |
std.assertEqual('afoo' >= 'abar', true) && |
| 48 |
std.assertEqual('abar' > 'afoo', false) && |
| 49 |
std.assertEqual('abar' >= 'afoo', false) && |
| 50 |
std.assertEqual('a' >= 'a', true) && |
| 51 |
std.assertEqual('a' <= 'a', true) && |
| 52 |
std.assertEqual('a' > 'a', false) && |
| 53 |
std.assertEqual('a' < 'a', false) && |
| 54 |
|
| 55 |
std.assertEqual('alphabet'[7], 't') && |
| 56 |
std.assertEqual('alphabet'[0], 'a') && |
| 57 |
|
| 58 |
true |