From c44513a6fd09567c743f8651bb91d8d121bf9b1c Mon Sep 17 00:00:00 2001 From: Meshulam Silk Date: Sun, 12 Apr 2015 06:02:36 +0300 Subject: [PATCH] Fixed age category builder toString --- lib/src/312/categories/age_geek_code_category.dart | 2 +- pubspec.yaml | 2 +- test/all_test.dart | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/src/312/categories/age_geek_code_category.dart b/lib/src/312/categories/age_geek_code_category.dart index 2ea734d..dd9930e 100644 --- a/lib/src/312/categories/age_geek_code_category.dart +++ b/lib/src/312/categories/age_geek_code_category.dart @@ -54,5 +54,5 @@ class AgeGeekCodeCategory extends GeekCodeCategory { : this._builder = builder, super(builder, grade); - String toString() => super.toString() + "${_builder._age}"; + String toString() => super.toString() + (_builder._age != null ? _builder._age : ""); } diff --git a/pubspec.yaml b/pubspec.yaml index 003ee57..6952de1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: geek_code -version: 2.0.0 +version: 2.0.1 author: Meshulam Silk description: Dart implementation of The Geek Code homepage: http://moomoohk.github.io/projects/geek_code diff --git a/test/all_test.dart b/test/all_test.dart index 45762e4..221fbd4 100644 --- a/test/all_test.dart +++ b/test/all_test.dart @@ -9,7 +9,7 @@ main() { GeekCodeV312 code = new GeekCodeV312([G312.IT, G312.CS, G312.B, G312.C] as List) ..addCategory(d.refuse()) ..addCategory(s.refuse()) - ..addCategory(a.age(20)) + ..addCategory(a.grade(new GeekCodeGrade(1))) ..addCategory(C.grade(new GeekCodeGrade(2))) ..addCategory(U.refuse()) ..addCategory(P.noKnowledge())