/
githubmirror
/
roslyn
Обзор
Документация
Войти
/
githubmirror
/
roslyn
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/VisualStudio/Core/Test.Next/TestUtils.cs
31 строка
1 KB
Cyrus Najmabadi
fix
12 апр 2024, 03:45
12 апр 2024, 03:45
773779f
Код
Авторство
О чём код?
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Collections.Generic; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.Remote; using Microsoft.CodeAnalysis.Serialization; using Xunit; namespace Roslyn.VisualStudio.Next.UnitTests; internal static class TestUtils { public static void VerifyAssetStorage<T>(IEnumerable<KeyValuePair<Checksum, T>> items, SolutionAssetCache storage) { foreach (var kv in items) { if (kv.Value is ChecksumCollection) { // ChecksumCollection itself won't be in asset storage. since it will be never asked from OOP side // to host to sync. the collection is already part of Solution/Project/DocumentStateChecksum so // syncing state checksum automatically bring in the collection. it only exist to calculate // hierarchical checksum continue; } Assert.True(storage.TryGetAsset(kv.Key, out object? _)); } } }