Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Unified Diff: pkg/analysis_services/test/index/store/temporary_folder_file_manager_test.dart

Issue 484733003: Import analysis_services.dart into analysis_server.dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analysis_services/test/index/store/temporary_folder_file_manager_test.dart
diff --git a/pkg/analysis_services/test/index/store/temporary_folder_file_manager_test.dart b/pkg/analysis_services/test/index/store/temporary_folder_file_manager_test.dart
deleted file mode 100644
index 99aae9bd76ab7db75a308e2a097a4e548ae8c110..0000000000000000000000000000000000000000
--- a/pkg/analysis_services/test/index/store/temporary_folder_file_manager_test.dart
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library test.services.src.index.store.temporary_folder_file_mananer;
-
-import 'dart:io';
-
-import 'package:analysis_services/src/index/store/temporary_folder_file_manager.dart';
-import 'package:analysis_testing/reflective_tests.dart';
-import 'package:path/path.dart';
-import 'package:unittest/unittest.dart';
-
-
-main() {
- groupSep = ' | ';
- runReflectiveTests(_SeparateFileManagerTest);
-}
-
-
-@ReflectiveTestCase()
-class _SeparateFileManagerTest {
- TemporaryFolderFileManager fileManager;
-
- void setUp() {
- fileManager = new TemporaryFolderFileManager();
- }
-
- void tearDown() {
- fileManager.clear();
- }
-
- test_clear() {
- String name = "42.index";
- // create the file
- return fileManager.write(name, <int>[1, 2, 3, 4]).then((_) {
- // check that the file exists
- expect(_existsSync(name), isTrue);
- // clear
- fileManager.clear();
- expect(_existsSync(name), isFalse);
- });
- }
-
- test_delete_doesNotExist() {
- return fileManager.write('other.index', <int>[1, 2, 3, 4]).then((_) {
- String name = "42.index";
- fileManager.delete(name);
- });
- }
-
- test_delete_noDirectory() {
- String name = "42.index";
- fileManager.delete(name);
- }
-
- test_outputInput() {
- String name = "42.index";
- // create the file
- return fileManager.write(name, <int>[1, 2, 3, 4]).then((_) {
- // check that that the file exists
- expect(_existsSync(name), isTrue);
- // read the file
- return fileManager.read(name).then((bytes) {
- expect(bytes, <int>[1, 2, 3, 4]);
- // delete
- fileManager.delete(name);
- // the file does not exist anymore
- return fileManager.read(name).then((bytes) {
- expect(bytes, isNull);
- });
- });
- });
- }
-
- test_read_noDirectory() {
- String name = "42.index";
- return fileManager.read(name).then((bytes) {
- expect(bytes, isNull);
- });
- }
-
- bool _existsSync(String name) {
- Directory directory = fileManager.test_directory;
- if (directory == null) {
- return false;
- }
- return new File(join(directory.path, name)).existsSync();
- }
-}
« no previous file with comments | « pkg/analysis_services/test/index/store/split_store_test.dart ('k') | pkg/analysis_services/test/index/store/test_all.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698