// Copyright 2014 The Flutter Authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.import'package:flutter/cupertino.dart';import'package:flutter_api_samples/cupertino/tab_scaffold/cupertino_tab_controller.0.dart'asexample;import'package:flutter_test/flutter_test.dart';voidmain(){testWidgets('Can switch tabs using CupertinoTabController',(WidgetTestertester)async{awaittester.pumpWidget(constexample.TabControllerApp(),);expect(find.text('Content of tab 0'),findsOneWidget);awaittester.tap(find.byIcon(CupertinoIcons.star_circle_fill));awaittester.pumpAndSettle();expect(find.text('Content of tab 1'),findsOneWidget);awaittester.tap(find.text('Go to first tab'));awaittester.pumpAndSettle();expect(find.text('Content of tab 0'),findsOneWidget);});}