forked from Workiva/over_react
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into gh-pages
- Loading branch information
Showing
18 changed files
with
411 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
analyzer: | ||
exclude: | ||
- integrate/** | ||
linter: | ||
rules: | ||
- annotate_overrides | ||
- avoid_empty_else | ||
- avoid_init_to_null | ||
- avoid_return_types_on_setters | ||
- camel_case_types | ||
- empty_constructor_bodies | ||
- hash_and_equals | ||
- library_names | ||
- library_prefixes | ||
- package_api_docs | ||
- package_names | ||
- package_prefixed_library_names | ||
- prefer_is_not_empty | ||
- slash_for_doc_comments | ||
- sort_constructors_first | ||
- sort_unnamed_constructors_first | ||
- type_init_formals | ||
- unnecessary_brace_in_string_interp | ||
- unnecessary_getters_setters |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
language: dart | ||
dart: | ||
- "1.17.1" | ||
with_content_shell: true | ||
before_install: | ||
- export DISPLAY=:99.0 | ||
- ./tool/setup_dartium.sh | ||
- export PATH=$PATH":$PWD" | ||
- sh -e /etc/init.d/xvfb start | ||
script: | ||
- pub run dart_dev analyze | ||
- pub run dart_dev test | ||
- ./tool/generate_coverage.sh | ||
- bash <(curl -s https://codecov.io/bash) -f coverage/coverage.lcov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// Copyright 2016 Workiva Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
library constants_base_test; | ||
|
||
import 'package:over_react/over_react.dart'; | ||
import 'package:test/test.dart'; | ||
|
||
/// Main entry point for DomUtil testing | ||
main() { | ||
group('DebugFriendlyConstant has the correct', () { | ||
test('toString implementation', () { | ||
var debugConst = const DebugConstantTest('Name'); | ||
|
||
expect(debugConst.debugDescription, 'Debug Description'); | ||
expect(debugConst.toString(), '${debugConst.runtimeType}.Name (Debug Description)'); | ||
}); | ||
|
||
test('debugDescription implementation', () { | ||
var classNameConst = const ClassNameConstantTest('Name', 'ClassName'); | ||
|
||
expect(classNameConst.debugDescription, 'className: ClassName'); | ||
expect(classNameConst.toString(), '${classNameConst.runtimeType}.Name (className: ClassName)'); | ||
}); | ||
}); | ||
} | ||
|
||
class DebugConstantTest extends DebugFriendlyConstant { | ||
const DebugConstantTest(String name) : super(name); | ||
|
||
@override | ||
String get debugDescription => 'Debug Description'; | ||
} | ||
|
||
class ClassNameConstantTest extends ClassNameConstant { | ||
const ClassNameConstantTest(String name, String className) : super(name, className); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.