// Copyright 2017 The Chromium 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/material.dart';import'package:flutter_test/flutter_test.dart';voidmain(){group('TimeOfDay.format',(){testWidgets('respects alwaysUse24HourFormat option',(WidgetTestertester)async{Future<String>pumpTest(boolalwaysUse24HourFormat)async{StringformattedValue;awaittester.pumpWidget(newMaterialApp(home:newMediaQuery(data:newMediaQueryData(alwaysUse24HourFormat:alwaysUse24HourFormat),child:newBuilder(builder:(BuildContextcontext){formattedValue=constTimeOfDay(hour:7,minute:0).format(context);returnnewContainer();}),),));returnformattedValue;}expect(awaitpumpTest(false),'7:00 AM');expect(awaitpumpTest(true),'07:00');});});}