Skip to content

Commit

Permalink
Solved Testing semantics
Browse files Browse the repository at this point in the history
  • Loading branch information
martingdela committed Feb 18, 2020
1 parent b61bab2 commit c40ce7c
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 44 deletions.
4 changes: 4 additions & 0 deletions .flutter-plugins
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# This is a generated file; do not edit or check into version control.
shared_preferences=/Users/luna/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.6+1/
shared_preferences_macos=/Users/luna/.pub-cache/hosted/pub.dartlang.org/shared_preferences_macos-0.0.1+5/
shared_preferences_web=/Users/luna/.pub-cache/hosted/pub.dartlang.org/shared_preferences_web-0.1.2+3/
1 change: 1 addition & 0 deletions .flutter-plugins-dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences","path":"/Users/luna/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.6+1/","dependencies":[]}],"android":[{"name":"shared_preferences","path":"/Users/luna/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.6+1/","dependencies":[]}],"macos":[{"name":"shared_preferences_macos","path":"/Users/luna/.pub-cache/hosted/pub.dartlang.org/shared_preferences_macos-0.0.1+5/","dependencies":[]}],"linux":[],"windows":[],"web":[{"name":"shared_preferences_web","path":"/Users/luna/.pub-cache/hosted/pub.dartlang.org/shared_preferences_web-0.1.2+3/","dependencies":[]}]},"dependencyGraph":[{"name":"shared_preferences","dependencies":["shared_preferences_macos","shared_preferences_web"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]}],"date_created":"2020-02-17 18:53:44.391856","version":"1.14.6"}
4 changes: 4 additions & 0 deletions .idea/eightQueens.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/libraries/Flutter_Plugins.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

104 changes: 60 additions & 44 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions test/eight_test.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:eight_queens/queens.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:shared_preferences/shared_preferences.dart';


void main() {
Expand All @@ -8,11 +9,13 @@ void main() {
group('Eight Queens algorithm', () {

test('count should be 2 on a 4 piece chessboard', () {
SharedPreferences.setMockInitialValues({});
Future<int> future = QueenResolver().solve(4);
expect(future,completion(equals(2)));
});

test('count should be 92 on a 8 piece chessboard', () {
SharedPreferences.setMockInitialValues({});
Future<int> future = QueenResolver().solve(8);
expect(future,completion(equals(92)));
});
Expand Down

0 comments on commit c40ce7c

Please sign in to comment.