Skip to content

Commit 27413b3

Browse files
committed
Remove #region directives from test files
Replace #region/#endregion with section comments per coding standards. Affected files: - AudioPropertiesTests.cs - DisposeTests.cs - DsdApiConsistencyTests.cs - SaveToFileConvenienceTests.cs
1 parent b6dfbd3 commit 27413b3

File tree

4 files changed

+15
-45
lines changed

4 files changed

+15
-45
lines changed

tests/TagLibSharp2.Tests/Core/AudioPropertiesTests.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public void FromFlac_LargeFile_HandlesUlongSamples ()
164164
Assert.AreEqual (4608, props.Bitrate);
165165
}
166166

167-
#region DSD Format Tests
167+
// ===== DSD Format Tests =====
168168

169169
[TestMethod]
170170
public void FromDsf_DSD64Stereo_CalculatesCorrectBitrate ()
@@ -255,6 +255,4 @@ public void FromDff_DSD1024With6Channels_NoOverflow ()
255255
Assert.AreEqual (270950, props.Bitrate);
256256
Assert.IsTrue (props.IsValid);
257257
}
258-
259-
#endregion
260258
}

tests/TagLibSharp2.Tests/Core/DisposeTests.cs

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace TagLibSharp2.Tests.Core;
1414
[TestCategory ("Dispose")]
1515
public class DisposeTests
1616
{
17-
#region FlacFile Dispose Tests
17+
// ===== FlacFile Dispose Tests =====
1818

1919
[TestMethod]
2020
public void FlacFile_Dispose_ClearsReferences ()
@@ -45,9 +45,7 @@ public void FlacFile_DoubleDispose_DoesNotThrow ()
4545
file.Dispose (); // Should not throw
4646
}
4747

48-
#endregion
49-
50-
#region OggVorbisFile Dispose Tests
48+
// ===== OggVorbisFile Dispose Tests =====
5149

5250
[TestMethod]
5351
public void OggVorbisFile_Dispose_ClearsReferences ()
@@ -78,9 +76,7 @@ public void OggVorbisFile_DoubleDispose_DoesNotThrow ()
7876
file.Dispose ();
7977
}
8078

81-
#endregion
82-
83-
#region OggOpusFile Dispose Tests
79+
// ===== OggOpusFile Dispose Tests =====
8480

8581
[TestMethod]
8682
public void OggOpusFile_Dispose_ClearsReferences ()
@@ -111,9 +107,7 @@ public void OggOpusFile_DoubleDispose_DoesNotThrow ()
111107
file.Dispose ();
112108
}
113109

114-
#endregion
115-
116-
#region Mp4File Dispose Tests
110+
// ===== Mp4File Dispose Tests =====
117111

118112
[TestMethod]
119113
public void Mp4File_Dispose_ClearsReferences ()
@@ -144,9 +138,7 @@ public void Mp4File_DoubleDispose_DoesNotThrow ()
144138
file.Dispose ();
145139
}
146140

147-
#endregion
148-
149-
#region WavFile Dispose Tests
141+
// ===== WavFile Dispose Tests =====
150142

151143
[TestMethod]
152144
public void WavFile_Dispose_ClearsReferences ()
@@ -177,9 +169,7 @@ public void WavFile_DoubleDispose_DoesNotThrow ()
177169
file.Dispose ();
178170
}
179171

180-
#endregion
181-
182-
#region AiffFile Dispose Tests
172+
// ===== AiffFile Dispose Tests =====
183173

184174
[TestMethod]
185175
public void AiffFile_Dispose_ClearsReferences ()
@@ -210,6 +200,4 @@ public void AiffFile_DoubleDispose_DoesNotThrow ()
210200
file.Dispose ();
211201
file.Dispose ();
212202
}
213-
214-
#endregion
215203
}

tests/TagLibSharp2.Tests/Core/DsdApiConsistencyTests.cs

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace TagLibSharp2.Tests.Core;
1717
[TestCategory ("Consistency")]
1818
public class DsdApiConsistencyTests
1919
{
20-
#region Property Type Consistency Tests
20+
// ===== Property Type Consistency Tests =====
2121

2222
[TestMethod]
2323
public void DsfFile_SampleRate_IsInt ()
@@ -90,9 +90,7 @@ public void DffFile_BitsPerSample_PropertyExists ()
9090
Assert.AreEqual (1, bitsPerSample);
9191
}
9292

93-
#endregion
94-
95-
#region SampleCount Consistency Tests
93+
// ===== SampleCount Consistency Tests =====
9694

9795
[TestMethod]
9896
public void DsfFile_SampleCount_IsPublic ()
@@ -117,9 +115,7 @@ public void DffFile_SampleCount_IsPublic ()
117115
Assert.IsTrue (sampleCount > 0);
118116
}
119117

120-
#endregion
121-
122-
#region SaveToFile API Consistency Tests
118+
// ===== SaveToFile API Consistency Tests =====
123119

124120
[TestMethod]
125121
public void DffFile_SaveToFile_WithPathAndFileSystem_Exists ()
@@ -210,9 +206,7 @@ public async Task DffFile_SaveToFileAsync_WithPath_Exists ()
210206
Assert.AreEqual ("Async Test", reparsed.File!.Id3v2Tag!.Title);
211207
}
212208

213-
#endregion
214-
215-
#region AudioProperties Consistency Tests
209+
// ===== AudioProperties Consistency Tests =====
216210

217211
[TestMethod]
218212
public void DsfAudioProperties_Channels_MatchesFileChannels ()
@@ -236,9 +230,7 @@ public void DffAudioProperties_Channels_MatchesFileChannels ()
236230
Assert.AreEqual (result.File!.Channels, result.File.Properties!.Channels);
237231
}
238232

239-
#endregion
240-
241-
#region Helper Methods
233+
// ===== Helper Methods =====
242234

243235
private static byte[] CreateMinimalDsfFile ()
244236
{
@@ -380,6 +372,4 @@ private static void WriteUInt16BE (Stream s, ushort v)
380372
s.WriteByte ((byte)(v >> 8));
381373
s.WriteByte ((byte)v);
382374
}
383-
384-
#endregion
385375
}

tests/TagLibSharp2.Tests/Core/SaveToFileConvenienceTests.cs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ static byte[] CreateMinimalOggVorbis ()
117117
return builder.ToBinaryData ().ToArray ();
118118
}
119119

120-
#region Mp3File Tests
120+
// ===== Mp3File Tests =====
121121

122122
[TestMethod]
123123
public void Mp3File_ReadFromFile_SetsSourcePath ()
@@ -193,9 +193,7 @@ public void Mp3File_SaveToFile_NoSourcePath_Fails ()
193193
Assert.IsTrue (saveResult.Error!.Contains ("source"));
194194
}
195195

196-
#endregion
197-
198-
#region FlacFile Tests
196+
// ===== FlacFile Tests =====
199197

200198
[TestMethod]
201199
public void FlacFile_ReadFromFile_SetsSourcePath ()
@@ -270,9 +268,7 @@ public void FlacFile_SaveToFile_NoSourcePath_Fails ()
270268
Assert.IsTrue (saveResult.Error!.Contains ("source"));
271269
}
272270

273-
#endregion
274-
275-
#region OggVorbisFile Tests
271+
// ===== OggVorbisFile Tests =====
276272

277273
[TestMethod]
278274
public void OggVorbisFile_ReadFromFile_SetsSourcePath ()
@@ -346,6 +342,4 @@ public void OggVorbisFile_SaveToFile_NoSourcePath_Fails ()
346342
Assert.IsFalse (saveResult.IsSuccess);
347343
Assert.IsTrue (saveResult.Error!.Contains ("source"));
348344
}
349-
350-
#endregion
351345
}

0 commit comments

Comments
 (0)