| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library shelf_static.test_util; | |
| 6 | |
| 7 import 'dart:async'; | 5 import 'dart:async'; |
| 8 | 6 |
| 9 import 'package:path/path.dart' as p; | 7 import 'package:path/path.dart' as p; |
| 10 import 'package:shelf/shelf.dart'; | 8 import 'package:shelf/shelf.dart'; |
| 11 import 'package:shelf_static/src/util.dart'; | 9 import 'package:shelf_static/src/util.dart'; |
| 12 import 'package:test/test.dart'; | 10 import 'package:test/test.dart'; |
| 13 | 11 |
| 14 final p.Context _ctx = p.url; | 12 final p.Context _ctx = p.url; |
| 15 | 13 |
| 16 /// Makes a simple GET request to [handler] and returns the result. | 14 /// Makes a simple GET request to [handler] and returns the result. |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 } | 54 } |
| 57 | 55 |
| 58 Description describe(Description descirption) => descirption.add( | 56 Description describe(Description descirption) => descirption.add( |
| 59 'Must be at the same moment as $_target with resolution ' | 57 'Must be at the same moment as $_target with resolution ' |
| 60 'to the second.'); | 58 'to the second.'); |
| 61 } | 59 } |
| 62 | 60 |
| 63 bool datesEqualToSecond(DateTime d1, DateTime d2) { | 61 bool datesEqualToSecond(DateTime d1, DateTime d2) { |
| 64 return toSecondResolution(d1).isAtSameMomentAs(toSecondResolution(d2)); | 62 return toSecondResolution(d1).isAtSameMomentAs(toSecondResolution(d2)); |
| 65 } | 63 } |
| OLD | NEW |