Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
imaNNeo committed Aug 21, 2023
1 parent aeb08ef commit 7b4a6c5
Show file tree
Hide file tree
Showing 10 changed files with 104 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test_dart_console/main.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
void main() {

}

String concatAll(List<String> input) {
String all = '';
for (final item in input) {
all += item.toString();
}

return all;
}
3 changes: 3 additions & 0 deletions untitled1/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://dart.dev/guides/libraries/private-files
# Created by `dart pub`
.dart_tool/
3 changes: 3 additions & 0 deletions untitled1/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 1.0.0

- Initial version.
2 changes: 2 additions & 0 deletions untitled1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
A sample command-line application with an entrypoint in `bin/`, library code
in `lib/`, and example unit test in `test/`.
30 changes: 30 additions & 0 deletions untitled1/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This file configures the static analysis results for your project (errors,
# warnings, and lints).
#
# This enables the 'recommended' set of lints from `package:lints`.
# This set helps identify many issues that may lead to problems when running
# or consuming Dart code, and enforces writing Dart using a single, idiomatic
# style and format.
#
# If you want a smaller set of lints you can change this to specify
# 'package:lints/core.yaml'. These are just the most critical lints
# (the recommended set includes the core lints).
# The core lints are also what is used by pub.dev for scoring packages.

include: package:lints/recommended.yaml

# Uncomment the following section to specify additional rules.

# linter:
# rules:
# - camel_case_types

# analyzer:
# exclude:
# - path/to/excluded/files/**

# For more information about the core and recommended set of lints, see
# https://dart.dev/go/core-lints

# For additional information about configuring this file, see
# https://dart.dev/guides/language/analysis-options
14 changes: 14 additions & 0 deletions untitled1/bin/untitled1.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import 'package:untitled1/untitled1.dart' as untitled1;

void main(List<String> arguments) {
print(concatAll([1.123, 1, 3]));
}

String concatAll(List<int> items) {
String all = '';
for (final item in items) {
all += item.toString();
}
return all;
}

3 changes: 3 additions & 0 deletions untitled1/lib/untitled1.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
int calculate() {
return 6 * 7;
}
15 changes: 15 additions & 0 deletions untitled1/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: untitled1
description: A sample command-line application.
version: 1.0.0
# repository: https://github.com/my_org/my_repo

environment:
sdk: ^3.0.6

# Add regular dependencies here.
dependencies:
# path: ^1.8.0

dev_dependencies:
lints: ^2.0.0
test: ^1.21.0
8 changes: 8 additions & 0 deletions untitled1/test/untitled1_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import 'package:untitled1/untitled1.dart';
import 'package:test/test.dart';

void main() {
test('calculate', () {
expect(calculate(), 42);
});
}
14 changes: 14 additions & 0 deletions untitled1/untitled1.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/.pub" />
<excludeFolder url="file://$MODULE_DIR$/build" />
</content>
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Dart SDK" level="project" />
<orderEntry type="library" name="Dart Packages" level="project" />
</component>
</module>

0 comments on commit 7b4a6c5

Please sign in to comment.