81 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 796d8d0956 Add .NET 10.0 target to all unit test projects
Updated the TargetFrameworks property in all unit test .csproj files to include net10.0, enabling tests to run against the latest .NET version.
2025-11-24 13:54:41 -08:00
Sergio Pedri 85d26bf421 Update NuGet packages to latest stable 2025-11-10 12:17:43 -08:00
Sergio Pedri 013b10cd71 Update NuGet packages to latest stable 2025-11-10 11:56:58 -08:00
Sergio Pedri 1abeff602b Mark more members as 'readonly' 2025-11-10 11:54:56 -08:00
Sergio Pedri 6e83642f07 Enable parallel test execution via shared target
Moved the ParallelizeAttribute configuration from individual test project files to the shared Community.Toolkit.Common.targets file. This centralizes the configuration and ensures all test projects run tests in parallel by default.
2025-11-09 18:48:08 -08:00
Sergio Pedri d2ceba9b14 Enable parallel test execution in MSTest projects
Added the Microsoft.VisualStudio.TestTools.UnitTesting.ParallelizeAttribute to all MSTest-based unit test project files to enable parallel test execution. This change should improve test run performance by allowing tests to run concurrently.
2025-11-09 18:46:37 -08:00
Sergio Pedri d8d3d07c88 Cast stream.Position to int in Assert.HasCount calls
Updated all usages of Assert.HasCount to explicitly cast stream.Position to int. This ensures type consistency and prevents potential issues when stream.Position is a long.
2025-11-09 18:36:55 -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 2cf609c877 Update MSTest packages to version 4.0.1 in test projects
Upgraded MSTest.TestAdapter and MSTest.TestFramework from version 3.11.0 to 4.0.1 across all unit test project files to ensure compatibility with the latest features and bug fixes.
2025-11-09 18:30:20 -08:00
Sergio Pedri 417ae60969 Remove duplicate DataRow attributes in unit tests
Eliminated repeated [DataRow(64, 4, 0)] attributes from three test methods in Test_MemoryExtensions.cs to avoid redundant test cases and improve test clarity.
2025-11-07 14:56:47 -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
Sergio Pedri 5215c84a7f Update MSTest packages to version 3.11.0 in test projects
Upgrades MSTest.TestAdapter and MSTest.TestFramework from 3.6.4 to 3.11.0 across all unit test project files to ensure compatibility with latest features and bug fixes.
2025-11-06 16:10:55 -08:00
Sergio Pedri 77e0435df0 Bump unit tests from .NET 7 to .NET 9 2025-11-05 12:55:43 -08:00
Youssef Victor 78348ca09a Improve test coverage for SpanExtensions.IndexOf (#1023) 2024-12-10 19:47:24 -08:00
Sergio Pedri a8aaeb57e9 Update NuGet packages to latest stable 2024-12-05 09:27:31 -08:00
Paulo Morgado b8aa65ac4e Added stream over 'ReadOnlySequence<byte>' 2024-11-19 16:26:52 -08:00
Sergio Pedri a51efde86d Remove .NET 8 TFM from all projects 2024-11-13 08:57:07 -08:00
Sergio Pedri f9c7bc3e87 Update NuGet packages to latest stable 2024-10-27 14:54:54 -07:00
Piotr Zięzio 8de7190cb0 Fix IBufferWriterExtensions Write for unmanaged types 2024-08-20 10:10:01 -07:00
Austin Kearns 395e54a1c8 Add sizeof(T) to Memory2D offset from MemoryManager 2024-08-07 23:53:55 -07:00
Sergio Pedri a25a8a0c14 Update NuGet packages to latest stable 2024-08-07 22:34:09 -07:00
Sergio Pedri b4cf03ca9a Bump NuGet packages to latest stable 2024-01-20 19:13:42 +01:00
Sergio Pedri 98c5b3caa6 Add missing in modifiers 2024-01-20 17:27:19 +01:00
Sergio Pedri af5089801d Add .NET 8 TFM to all projects 2024-01-20 17:27:18 +01:00
Sergio Pedri 77c7ef2b15 Update NuGet packages to latest stable 2023-05-08 12:46:49 +02:00
Sergio Pedri 46b52b49df Add unit tests for slicing a 2D memory from manager 2023-04-27 17:22:48 +02:00
Sergio Pedri 1537e98edb Bump NuGet packages to latest stable 2023-03-10 01:47:17 +01:00
Sergio Pedri 0ec2c25f7a Add ArrayPoolBufferWriter<T>.DangerousGetArray() 2023-02-20 13:11:38 +01:00
Sergio Pedri bc740416e2 Update NuGet packages to latest stable releases 2022-12-22 14:13:30 +01:00
Sergio Pedri cf451e8ac2 Fix exception type from Stream.Read extension 2022-12-13 16:22:22 +01:00
Sergio Pedri a7cfaa23ad Merge pull request #519 from CommunityToolkit/dev/ref-fields-memory
Use ref fields on .NET 7 for all span-like types
2022-12-12 07:06:40 -08:00
Sergio Pedri 7eef9f293e Add unit tests for buffered StreamExtensions.Read<T> 2022-12-07 16:57:22 +01:00
Sergio Pedri 83dd209f5f Fix mutability of ReadOnlySpan2D<T>.GetPinnableReference() 2022-12-07 13:20:54 +01:00
Sergio Pedri d105721bb2 Replace Unsafe.NullRef<T>() with ref *(T*)null 2022-11-23 16:38:04 +01:00
Sergio Pedri 3bbfe6c75e Replace Unsafe.SizeOf<T>() with sizeof(T) 2022-11-23 02:52:02 +01:00
Sergio Pedri 1f60a7bd4e Move all source files into src\ subfolder 2022-11-21 17:25:07 +01:00
Sergio Pedri ffb818aa15 Switch .NET Core 3.1 TFM in tests to .NET 7 2022-11-16 01:48:01 +01:00
Sergio Pedri 8730e39067 Bump NuGet packages to latest stable versions 2022-11-15 19:47:43 +01:00
Sergio Pedri 15da57b8b3 Bump HighPerformance package to .NET 7 2022-10-26 13:22:14 +02:00
Sergio Pedri 233c4f2421 Update all Roslyn and test SDKs to latest stable 2022-10-04 13:53:37 +02:00
Sergio Pedri 20940ee744 Suppress CA2252 warnings 2022-09-16 12:32:41 +02:00
Sergio Pedri 8528092ed2 Merge pull request #266 from OronDF343/add-memorystream-copytoasync
Asynchronous implementation of `MemorySource<TSource>.CopyToAsync`
2022-07-06 15:08:52 +02:00
Oron Feinerman b831020f70 Add unit tests for CopyTo and CopyToAsync 2022-06-12 10:45:39 +03:00
Sergio Pedri d4a8971ff6 Merge pull request #237 from danielbanda/Typos
Typos
2022-05-25 20:12:29 +02:00
Sergio Pedri d1f7c051aa Resolve some build warnings 2022-05-09 15:58:40 +02:00
Daniel Banda f2dce06b4d Fixing some typos. 2022-05-03 21:21:10 -07:00
ovska 714576210d Test ArrayPoolExtensions.EnsureCapacity 2022-04-08 19:05:21 +03:00