Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(589)

Side by Side Diff: src/tests/site/code/testing.dart

Issue 83663005: added front page samples to testing, plus a couple of tweaks to front page and code lab (Closed) Base URL: https://github.com/dart-lang/dartlang.org.git@master
Patch Set: changed width of iframe for pirate badge app Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/tests/site/code/syntax.dart ('k') | src/tests/site/code/types_no.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 import 'package:unittest/unittest.dart';
2 import 'dart:math' show Point;
3
4 main() {
5 Point a = new Point(2, 15);
6 Point b = new Point(7, 3);
7
8 test('point distances', () {
9 expect(a.distanceTo(b), equals(13));
10 });
11 test('point magnitude close to', () {
12 expect(a.magnitude, closeTo(15, .25));
13 });
14 test('point magnitude greater than', () {
15 expect(a.magnitude, greaterThan(b.magnitude));
16 });
17 test('point == operator', () {
18 expect(a == b, equals(false));
19 });
20 }
OLDNEW
« no previous file with comments | « src/tests/site/code/syntax.dart ('k') | src/tests/site/code/types_no.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698