Skip to content

Commit

Permalink
travis addons added
Browse files Browse the repository at this point in the history
  • Loading branch information
Nabute committed Mar 29, 2020
1 parent 4239eb8 commit ff9c323
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 83 deletions.
13 changes: 11 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,17 @@ language: dart
dart:
- stable

install:
- flutter pub get
os:
- linux
sudo: false
addons:
apt:
# Flutter depends on /usr/lib/x86_64-linux-gnu/libstdc++.so.6 version GLIBCXX_3.4.18
sources:
- ubuntu-toolchain-r-test # if we don't specify this, the libstdc++6 we get is the wrong version
packages:
- libstdc++6
- fonts-droid-fallback

before_script:
- git clone https://github.com/flutter/flutter.git -b beta
Expand Down
4 changes: 1 addition & 3 deletions example/example_abushakir.dart
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,4 @@ void main() {
// print("Year First Month First Day:= ${date.weekday}");
}

String formatMonth(Iterable monthDays) {

}
String formatMonth(Iterable monthDays) {}
58 changes: 29 additions & 29 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,33 +21,33 @@ dev_dependencies:
# The following section is specific to Flutter.
flutter:

# To add assets to your package, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg
#
# For details regarding assets in packages, see
# https://flutter.dev/assets-and-images/#from-packages
#
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware.
# To add assets to your package, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg
#
# For details regarding assets in packages, see
# https://flutter.dev/assets-and-images/#from-packages
#
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware.

# To add custom fonts to your package, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts in packages, see
# https://flutter.dev/custom-fonts/#from-packages
# To add custom fonts to your package, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts in packages, see
# https://flutter.dev/custom-fonts/#from-packages
86 changes: 37 additions & 49 deletions test/ethiopiancalendar_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,59 +3,54 @@ import 'package:test/test.dart';
import 'package:ethiopiancalendar/abushakir.dart';

void main() {

group('Parameterized Constructors :', () {

EtDatetime ec;

setUp(() {
ec = EtDatetime(year: 2012, month: 07, day: 07);
});

test('Testing Year on Parameterized Constructor', (){
test('Testing Year on Parameterized Constructor', () {
expect(ec.year, 2012);
});

test('Testing Month on Parameterized Constructor', (){
test('Testing Month on Parameterized Constructor', () {
expect(ec.month, 07);
});

//FIXME: Day is reduced by 1
test('Testing Day on Parameterized Constructor', (){
test('Testing Day on Parameterized Constructor', () {
expect(ec.day, 07);
});

//FIXME: Day is reduced by 1
test('Testing Date on Parameterized Constructor', (){
test('Testing Date on Parameterized Constructor', () {
expect(ec.dayGeez, "፯");
});
});

//FIXME: All
group('Parameterized Constructors (year only) :', () {

EtDatetime ec;

setUp(() {
ec = EtDatetime(year: 2010);
});

test('Testing Year on Parameterized Constructor', (){
test('Testing Year on Parameterized Constructor', () {
expect(ec.year, 2010);
});

test('Testing Month on Parameterized Constructor', (){
test('Testing Month on Parameterized Constructor', () {
expect(ec.month, 01);
});

test('Testing Day on Parameterized Constructor', (){
test('Testing Day on Parameterized Constructor', () {
expect(ec.day, 01);
});
});


group('Named Constructors (.parse) :', () {

EtDatetime ec;

setUp(() {
Expand All @@ -67,151 +62,144 @@ void main() {
expect(ec.toString(), "2012-07-07 18:26:31.449");
});

test('Testing Year on Named Constructor', (){
test('Testing Year on Named Constructor', () {
expect(ec.year, 2012);
});

test('Testing Month on Named Constructor', (){
test('Testing Month on Named Constructor', () {
expect(ec.month, 07);
});

//FIXME: Day is reduced by 1
test('Testing Day on Named Constructor', (){
test('Testing Day on Named Constructor', () {
expect(ec.day, 07);
});

//FIXEME: Day is reduced 1
test('Testing Date with Named Constructor', (){
test('Testing Date with Named Constructor', () {
expect(ec.dayGeez, "፯");
});

//FIXME: Reason Unknown
test('Testing Hour on Named Constructor', (){
test('Testing Hour on Named Constructor', () {
expect(ec.hour, 18);
});

test('Testing Minute on Named Constructor', (){
test('Testing Minute on Named Constructor', () {
expect(ec.minute, 26);

});

test('Testing Second on Named Constructor', (){
test('Testing Second on Named Constructor', () {
expect(ec.second, 31);
});

test('Testing Millisecond on Named Constructor', (){
test('Testing Millisecond on Named Constructor', () {
expect(ec.millisecond, 449);
});
});


group('Named Constructors (.now) :', () {

EtDatetime ec;

setUp(() {
ec = EtDatetime.now();
});

test('Testing Year on .now() Named Constructor', (){
test('Testing Year on .now() Named Constructor', () {
expect(ec.year, 2012);
});

test('Testing Month on .now() Named Constructor', (){
test('Testing Month on .now() Named Constructor', () {
expect(ec.month, 07);
});

test('Testing Month Geez on .now() Named Constructor', (){
test('Testing Month Geez on .now() Named Constructor', () {
expect(ec.monthGeez, "መጋቢት");
});

test('Testing Day on .now() Named Constructor', (){
test('Testing Day on .now() Named Constructor', () {
expect(ec.day, 10);
});

test('Testing Day Geez on .now() Named Constructor', (){
test('Testing Day Geez on .now() Named Constructor', () {
expect(ec.dayGeez, "፲");
});

test('Testing Hour on .now() Named Constructor', (){
test('Testing Hour on .now() Named Constructor', () {
expect(ec.hour, 6);
});

test('Testing Minute on .now() Named Constructor', (){
test('Testing Minute on .now() Named Constructor', () {
expect(ec.minute, DateTime.now().minute);

});

test('Testing Second on .now() Named Constructor', (){
test('Testing Second on .now() Named Constructor', () {
expect(ec.second, DateTime.now().second);
});
});

group('BahireHasab :', () {

BahireHasab bh;

setUp(() {
bh = BahireHasab();
});

test('Testing Abekte', (){
test('Testing Abekte', () {
expect(bh.getAbekte(), 6);
});

test('Testing Metkih', (){
test('Testing Metkih', () {
expect(bh.getMetkih(), 24);
});

test('Testing Nenewe', (){
test('Testing Nenewe', () {
expect(bh.getNenewe(), {'month': 'የካቲት', 'date': 2});
});

// getSingleBealOrTsom

test("Testing 'ነነዌ' on getSingleBealOrTsom", (){
test("Testing 'ነነዌ' on getSingleBealOrTsom", () {
expect(bh.getSingleBealOrTsom("ነነዌ"), {'month': 'የካቲት', 'date': 2});
});
test("Testing 'ዓቢይ ጾም' on getSingleBealOrTsom", (){
test("Testing 'ዓቢይ ጾም' on getSingleBealOrTsom", () {
expect(bh.getSingleBealOrTsom("ዓቢይ ጾም"), {'month': 'የካቲት', 'date': 16});
});

test("Testing 'ደብረ ዘይት' on getSingleBealOrTsom", (){
test("Testing 'ደብረ ዘይት' on getSingleBealOrTsom", () {
expect(bh.getSingleBealOrTsom("ደብረ ዘይት"), {'month': 'መጋቢት', 'date': 13});
});

test("Testing 'ሆሣዕና' on getSingleBealOrTsom", (){
test("Testing 'ሆሣዕና' on getSingleBealOrTsom", () {
expect(bh.getSingleBealOrTsom("ሆሣዕና"), {'month': 'ሚያዝያ', 'date': 4});
});

test("Testing 'ስቅለት' on getSingleBealOrTsom", (){
test("Testing 'ስቅለት' on getSingleBealOrTsom", () {
expect(bh.getSingleBealOrTsom("ስቅለት"), {'month': 'ሚያዝያ', 'date': 9});
});

test("Testing 'ትንሳኤ' on getSingleBealOrTsom", (){
test("Testing 'ትንሳኤ' on getSingleBealOrTsom", () {
expect(bh.getSingleBealOrTsom("ትንሳኤ"), {'month': 'ሚያዝያ', 'date': 11});
});

test("Testing 'ርክበ ካህናት' on getSingleBealOrTsom", (){
test("Testing 'ርክበ ካህናት' on getSingleBealOrTsom", () {
expect(bh.getSingleBealOrTsom("ርክበ ካህናት"), {'month': 'ግንቦት', 'date': 11});
});

test("Testing 'ዕርገት' on getSingleBealOrTsom", (){
test("Testing 'ዕርገት' on getSingleBealOrTsom", () {
expect(bh.getSingleBealOrTsom("ዕርገት"), {'month': 'ግንቦት', 'date': 20});
});

test("Testing 'ጰራቅሊጦስ' on getSingleBealOrTsom", (){
test("Testing 'ጰራቅሊጦስ' on getSingleBealOrTsom", () {
expect(bh.getSingleBealOrTsom("ጰራቅሊጦስ"), {'month': 'ግንቦት', 'date': 30});
});

test("Testing 'ጾመ ሐዋርያት' on getSingleBealOrTsom", (){
test("Testing 'ጾመ ሐዋርያት' on getSingleBealOrTsom", () {
expect(bh.getSingleBealOrTsom("ጾመ ሐዋርያት"), {'month': 'ሰኔ', 'date': 1});
});

test("Testing 'ጾመ ድህነት' on getSingleBealOrTsom", (){
test("Testing 'ጾመ ድህነት' on getSingleBealOrTsom", () {
expect(bh.getSingleBealOrTsom("ጾመ ድህነት"), {'month': 'ሰኔ', 'date': 3});
});

});

}

0 comments on commit ff9c323

Please sign in to comment.