23 Commits

Author SHA1 Message Date
Marcin Krystianc 8323145328 Eliminate this = default shortcut when height * width = 0 2025-11-24 14:52:57 -08:00
Sergio Pedri 12ae36b594 Refactor unit tests to use new assertion helpers
Replaces usages of Assert.AreEqual, Assert.IsTrue, and similar assertions with new helper methods such as Assert.HasCount, Assert.IsEmpty, Assert.IsNull, and Assert.IsGreaterThanOrEqualTo across multiple test files. This improves test readability and consistency with updated assertion APIs.
2025-11-09 18:34:09 -08:00
Sergio Pedri e88c524c3e Refactor unit tests to use expected-first Assert.AreEqual
Updated all unit tests to consistently use the expected value as the first argument in Assert.AreEqual calls. This improves readability and aligns with best practices for test assertions.
2025-11-09 18:33:21 -08:00
Sergio Pedri 5eb6a68b42 Don't use '[ExpectedException]' in HighPerformance tests 2025-11-07 14:56:47 -08:00
Sergio Pedri 2b42d139af Use Assert.ThrowsExactly in unit tests
Replaces usage of Assert.ThrowsException with Assert.ThrowsExactly across multiple unit test files to ensure that tests only pass when the exact exception type is thrown, improving test precision and reliability.
2025-11-07 11:56:48 -08:00
Austin Kearns 395e54a1c8 Add sizeof(T) to Memory2D offset from MemoryManager 2024-08-07 23:53:55 -07:00
Sergio Pedri 98c5b3caa6 Add missing in modifiers 2024-01-20 17:27:19 +01:00
Sergio Pedri 46b52b49df Add unit tests for slicing a 2D memory from manager 2023-04-27 17:22:48 +02:00
Sergio Pedri 83dd209f5f Fix mutability of ReadOnlySpan2D<T>.GetPinnableReference() 2022-12-07 13:20:54 +01:00
Sergio Pedri ffb818aa15 Switch .NET Core 3.1 TFM in tests to .NET 7 2022-11-16 01:48:01 +01:00
Daniel Banda f2dce06b4d Fixing some typos. 2022-05-03 21:21:10 -07:00
Sergio Pedri 7d68280215 Remove redundant [TestCategory] attributes 2021-11-04 21:48:54 +01:00
Sergio Pedri a5ef60ea4d Enable .NET Standard 2.0 tests through .NET Framework 4.7.2 2021-11-02 02:36:50 +01:00
Sergio Pedri eab4b9ed28 More whitespaces and code style tweaks 2021-11-02 00:28:30 +01:00
Sergio Pedri 93cb82a0d0 Fix incorrect whitespaces, minor code style tweaks 2021-11-02 00:01:05 +01:00
Sergio Pedri 6afdd81742 Refactor multiline variable declarations 2021-11-01 23:42:45 +01:00
Sergio Pedri 51c7a67c20 More code style improvements and tweaks
- Remove unused namespaces
- Remove unused attributes
- Remove unnecessary #nullable enable directives
- Sort using directives
- Simplify names
2021-11-01 22:29:46 +01:00
Sergio Pedri 9f4c9fad7f Remove unnecessary using directives 2021-11-01 22:14:16 +01:00
Sergio Pedri 58c0dd96c4 Fix namespaces in unit test projects 2021-11-01 22:12:56 +01:00
Sergio Pedri c176080d37 Switch whole solution to file-scoped namespaces 2021-11-01 20:46:46 +01:00
Sergio Pedri 7a2295b03c Update some code style rules
In particular:
- Use explicit types everywhere to improve clarity
- Use target-typed new() expression when target is explicit
- Use explicit discard for value-returning statements
2021-11-01 20:34:00 +01:00
Sergio Pedri 8b7c87284b Update namespaces from Microsoft.Toolkit to CommunityToolkit 2021-11-01 17:22:05 +01:00
Sergio Pedri b498321331 Rename folders/projects from Microsoft.Toolkit to CommunityToolkit 2021-11-01 17:07:47 +01:00