Commit 9aa39192 authored by Devon Carew's avatar Devon Carew

add a test for flutter_sprites

parent 2508d34d
......@@ -26,7 +26,7 @@ import 'package:vector_math/vector_math_64.dart';
part 'src/action.dart';
part 'src/action_spline.dart';
part 'src/color_secuence.dart';
part 'src/color_sequence.dart';
part 'src/constraint.dart';
part 'src/effect_line.dart';
part 'src/image_map.dart';
......
......@@ -3,7 +3,13 @@ description: A sprite toolkit built on top of Flutter
version: 0.0.15
author: Flutter Authors <flutter-dev@googlegroups.com>
homepage: http://flutter.io
dependencies:
box2d: '>=0.2.0 <0.3.0'
flutter:
path: ../flutter
dev_dependencies:
flutter_tools:
path: ../flutter_tools
test: any # constrained by the dependency in flutter_tools
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:ui';
import 'package:flutter_sprites/flutter_sprites.dart';
import 'package:test/test.dart';
void main() {
test("Simple test of ColorSequence", () {
List<Color> colors = <Color>[const Color(0xFFFFFFFF), const Color(0x000000FF)];
List<double> stops = <double>[0.0, 1.0];
ColorSequence cs = new ColorSequence(colors, stops);
expect(cs.colorAtPosition(0.0), equals(const Color(0xFFFFFFFF)));
expect(cs.colorAtPosition(0.5), equals(const Color(0x7F7F7FFF)));
expect(cs.colorAtPosition(1.0), equals(const Color(0x000000FF)));
});
}
......@@ -8,7 +8,7 @@ flutter analyze --flutter-repo --no-current-directory --no-current-package --con
(cd packages/cassowary; pub run test -j1)
(cd packages/flutter; flutter test)
# (cd packages/flutter_sprites; ) # No tests to run.
(cd packages/flutter_sprites; flutter test)
(cd packages/flutter_tools; pub run test -j1)
# (cd packages/flutter_test; ) # No tests to run.
(cd packages/flx; pub run test -j1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment