// 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 'dart:convert'; import 'dart:io'; import 'common.dart'; // This will be used in many of our unit tests. void expectSetMatch(Iterable actual, Iterable expected) { expect(Set.from(actual), equals(Set.from(expected))); } // May return null if the credentials file doesn't exist. Map getTestGcpCredentialsJson() { final File f = File('secret/test_gcp_credentials.json'); if (!f.existsSync()) { return null; } return jsonDecode(File('secret/test_gcp_credentials.json').readAsStringSync()) as Map; }