Initial commit. I can successfully create random tensor.
This commit is contained in:
15
test/unit_test.dart
Normal file
15
test/unit_test.dart
Normal file
@ -0,0 +1,15 @@
|
||||
// This is an example unit test.
|
||||
//
|
||||
// A unit test tests a single function, method, or class. To learn more about
|
||||
// writing unit tests, visit
|
||||
// https://flutter.dev/docs/cookbook/testing/unit/introduction
|
||||
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
void main() {
|
||||
group('Plus Operator', () {
|
||||
test('should add two numbers together', () {
|
||||
expect(1 + 1, 2);
|
||||
});
|
||||
});
|
||||
}
|
31
test/widget_test.dart
Normal file
31
test/widget_test.dart
Normal file
@ -0,0 +1,31 @@
|
||||
// This is an example Flutter widget test.
|
||||
//
|
||||
// To perform an interaction with a widget in your test, use the WidgetTester
|
||||
// utility in the flutter_test package. For example, you can send tap and scroll
|
||||
// gestures. You can also use WidgetTester to find child widgets in the widget
|
||||
// tree, read text, and verify that the values of widget properties are correct.
|
||||
//
|
||||
// Visit https://flutter.dev/docs/cookbook/testing/widget/introduction for
|
||||
// more information about Widget testing.
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
void main() {
|
||||
group('MyWidget', () {
|
||||
testWidgets('should display a string of text', (WidgetTester tester) async {
|
||||
// Define a Widget
|
||||
const myWidget = MaterialApp(
|
||||
home: Scaffold(
|
||||
body: Text('Hello'),
|
||||
),
|
||||
);
|
||||
|
||||
// Build myWidget and trigger a frame.
|
||||
await tester.pumpWidget(myWidget);
|
||||
|
||||
// Verify myWidget shows some text
|
||||
expect(find.byType(Text), findsOneWidget);
|
||||
});
|
||||
});
|
||||
}
|
Reference in New Issue
Block a user