Skip to content

Commit 0839ce9

Browse files
committed
fix: add missing using System.Linq, fix encoding artifacts in test comments
1 parent 01f3707 commit 0839ce9

3 files changed

Lines changed: 20 additions & 19 deletions

File tree

tests/CoreTest/Bootstrap/BootstrapFullParameterMatrixTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
namespace CoreTest.Bootstrap
1111
{
1212
/// <summary>
13-
/// Full parameter matrix tests �?verifies ALL UpdateOptions constants
13+
/// Full parameter matrix tests verifies ALL UpdateOptions constants
1414
/// can be set via .Option() without throwing. Covers 39 options across
1515
/// core, deployment, silent, download, security, reporting, OSS, and
1616
/// blacklist categories.
@@ -256,7 +256,7 @@ public void Chain_ClientAndUpgrade_BothFullyConfigured()
256256
};
257257

258258
// ==========================================
259-
// CLIENT bootstrap �?full production config
259+
// CLIENT bootstrap full production config
260260
// ==========================================
261261
var clientBootstrap = new GeneralUpdateBootstrap()
262262
// --- Core ---
@@ -326,7 +326,7 @@ public void Chain_ClientAndUpgrade_BothFullyConfigured()
326326
Assert.NotNull(clientBootstrap);
327327

328328
// ==========================================
329-
// UPGRADE bootstrap �?full production config
329+
// UPGRADE bootstrap full production config
330330
// ==========================================
331331
var upgradeBootstrap = new GeneralUpdateBootstrap()
332332
// --- Core (Upgrade role) ---

tests/CoreTest/Bootstrap/ParameterMatrixAndEventTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System;
22
using System.Collections.Generic;
33
using System.IO;
4+
using System.Linq;
45
using System.Text;
56
using GeneralUpdate.Core.Download;
67
using GeneralUpdate.Core.FileSystem;

tests/DifferentialTest/DifferentialUpgradeIntegrationTests.cs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace DifferentialTest
2020
/// <summary>
2121
/// Comprehensive differential upgrade integration tests.
2222
/// Covers:
23-
/// - Client ??Upgrade mesh update: generate patches in client context, apply in upgrade context
23+
/// - Client Upgrade mesh update: generate patches in client context, apply in upgrade context
2424
/// - All file operations: modified, added, deleted, unchanged, binary
2525
/// - Complex directory structures
2626
/// - Push upgrade simulation via differential pipeline
@@ -44,7 +44,7 @@ public void Dispose()
4444
try { Directory.Delete(_testDir, true); } catch { /* ignore */ }
4545
}
4646

47-
#region Clean ??Dirty Full Cycle (Client ??Upgrade Mesh Update)
47+
#region Clean Dirty Full Cycle (Client Upgrade Mesh Update)
4848

4949
/// <summary>
5050
/// Scenario: Client generates patches (Clean), Upgrade applies them (Dirty).
@@ -53,7 +53,7 @@ public void Dispose()
5353
[Fact]
5454
public async Task CleanAndDirty_FullMeshUpdate_CorrectlyUpdatesApp()
5555
{
56-
// Arrange ??emulate client-side source (current version) and target (new version)
56+
// Arrange emulate client-side source (current version) and target (new version)
5757
var sourceDir = Path.Combine(_testDir, "source_v1.0.0");
5858
var targetDir = Path.Combine(_testDir, "target_v2.0.0");
5959
var patchDir = Path.Combine(_testDir, "patch");
@@ -69,7 +69,7 @@ public async Task CleanAndDirty_FullMeshUpdate_CorrectlyUpdatesApp()
6969
File.WriteAllText(Path.Combine(sourceDir, "main.dll"), "DLL content v1.0.0");
7070
File.WriteAllText(Path.Combine(sourceDir, "readme.txt"), "README v1.0.0");
7171

72-
// New version files (v2.0.0) ??config modified, readme deleted, new file added
72+
// New version files (v2.0.0) config modified, readme deleted, new file added
7373
File.WriteAllText(Path.Combine(targetDir, "config.json"), @"{""version"":""2.0.0"",""theme"":""light"",""newFeature"":true}");
7474
File.WriteAllText(Path.Combine(targetDir, "main.dll"), "DLL content v2.0.0");
7575
File.WriteAllText(Path.Combine(targetDir, "whatsnew.txt"), "What's New in v2.0.0!");
@@ -78,10 +78,10 @@ public async Task CleanAndDirty_FullMeshUpdate_CorrectlyUpdatesApp()
7878
foreach (var file in Directory.GetFiles(sourceDir))
7979
File.Copy(file, Path.Combine(appDir, Path.GetFileName(file)));
8080

81-
// Act ??Step 1: Client generates patches (Clean)
81+
// Act Step 1: Client generates patches (Clean)
8282
await DifferentialCore.Clean(sourceDir, targetDir, patchDir);
8383

84-
// Assert ??patches generated
84+
// Assert patches generated
8585
// config.json.patch generation depends on differ; verified by Dirty assertions below
8686
Assert.True(File.Exists(Path.Combine(patchDir, "main.dll.patch")));
8787
Assert.True(File.Exists(Path.Combine(patchDir, "whatsnew.txt"))); // new file copied directly
@@ -96,7 +96,7 @@ public async Task CleanAndDirty_FullMeshUpdate_CorrectlyUpdatesApp()
9696
Assert.NotNull(deleteList);
9797
Assert.Contains(deleteList, f => f.Name == "readme.txt");
9898

99-
// Act ??Step 2: Upgrade applies patches (Dirty)
99+
// Act Step 2: Upgrade applies patches (Dirty)
100100
await DifferentialCore.Dirty(appDir, patchDir);
101101

102102
// Assert - core files should still exist after Dirty
@@ -148,7 +148,7 @@ public async Task CleanAndDirty_BinaryFiles_ProducesCorrectResult()
148148
File.Copy(Path.Combine(sourceDir, "app.exe"), Path.Combine(appDir, "app.exe"));
149149
File.Copy(Path.Combine(sourceDir, "icon.png"), Path.Combine(appDir, "icon.png"));
150150

151-
// Act ??generate and apply patches
151+
// Act generate and apply patches
152152
await DifferentialCore.Clean(sourceDir, targetDir, patchDir);
153153
await DifferentialCore.Dirty(appDir, patchDir);
154154

@@ -249,7 +249,7 @@ public async Task CleanAndDirty_DeepNestedDirectories_CorrectlyUpdatesAll()
249249
await DifferentialCore.Clean(sourceDir, targetDir, patchDir);
250250
await DifferentialCore.Dirty(appDir, patchDir);
251251

252-
// Assert ??all files updated
252+
// Assert all files updated
253253
foreach (var path in paths)
254254
{
255255
var appFilePath = Path.Combine(appDir, path);
@@ -282,7 +282,7 @@ public async Task CleanAndDirty_MixedOperations_HandlesAllCorrectly()
282282
// 2. Deleted file
283283
File.WriteAllText(Path.Combine(sourceDir, "deprecated.dll"), "Old DLL");
284284

285-
// 3. New file (top-level only ??subdirectory new files tested separately)
285+
// 3. New file (top-level only subdirectory new files tested separately)
286286
File.WriteAllText(Path.Combine(targetDir, "new_feature.dll"), "New feature DLL");
287287

288288
// 4. Unchanged file
@@ -655,17 +655,17 @@ public async Task DeveloperScenario_VersionChainUpdate_ThreeIncrementalSteps()
655655
File.WriteAllText(Path.Combine(appDir, "app.exe"), "v1.0.0");
656656
File.WriteAllText(Path.Combine(appDir, "lib.dll"), "lib_v1");
657657

658-
// Step 1: v1.0.0 ??v1.0.1
658+
// Step 1: v1.0.0 v1.0.1
659659
var step1 = await ApplyIncrementalUpdate(appDir, "app.exe", "v1.0.0", "v1.0.1");
660660
Assert.True(step1);
661661
Assert.Equal("v1.0.1", File.ReadAllText(Path.Combine(appDir, "app.exe")));
662662

663-
// Step 2: v1.0.1 ??v1.0.2
663+
// Step 2: v1.0.1 v1.0.2
664664
var step2 = await ApplyIncrementalUpdate(appDir, "app.exe", "v1.0.1", "v1.0.2");
665665
Assert.True(step2);
666666
Assert.Equal("v1.0.2", File.ReadAllText(Path.Combine(appDir, "app.exe")));
667667

668-
// Step 3: v1.0.2 ??v1.0.3
668+
// Step 3: v1.0.2 v1.0.3
669669
var step3 = await ApplyIncrementalUpdate(appDir, "app.exe", "v1.0.2", "v1.0.3");
670670
Assert.True(step3);
671671
Assert.Equal("v1.0.3", File.ReadAllText(Path.Combine(appDir, "app.exe")));
@@ -765,7 +765,7 @@ public async Task Dirty_NonExistentAppPath_NoException()
765765

766766
var nonExistent = Path.Combine(_testDir, "does_not_exist");
767767

768-
// Act & Assert ??should not throw
768+
// Act & Assert should not throw
769769
await DifferentialCore.Dirty(nonExistent, patchDir);
770770
}
771771

@@ -781,7 +781,7 @@ public async Task Dirty_NonExistentPatchPath_NoException()
781781

782782
var nonExistent = Path.Combine(_testDir, "does_not_exist_patch");
783783

784-
// Act & Assert ??should not throw
784+
// Act & Assert should not throw
785785
await DifferentialCore.Dirty(appDir, nonExistent);
786786
}
787787

@@ -807,7 +807,7 @@ public async Task Dirty_AfterApplying_CleansUpTemporaryFiles()
807807
await DifferentialCore.Clean(src, tgt, patch);
808808
await DifferentialCore.Dirty(app, patch);
809809

810-
// Assert ??no leftover temp files
810+
// Assert no leftover temp files
811811
var filesInApp = Directory.GetFiles(app);
812812
Assert.Single(filesInApp);
813813
Assert.EndsWith("file.txt", filesInApp[0]);

0 commit comments

Comments
 (0)