Commit Graph
2620 Commits
Author SHA1 Message Date
Sergio Pedri 1273851d1b Add net10.0 target to unit test projects
Updated the TargetFrameworks in both CommunityToolkit.Mvvm.Roslyn5000.UnitTests and CommunityToolkit.Mvvm.SourceGenerators.Roslyn5000.UnitTests projects to include net10.0 for future .NET compatibility testing.
2025-11-24 15:41:09 -08:00
Sergio Pedri eb25f101a8 Merge pull request #1130 from marcin-krystianc/dev-20251028-span2d
Eliminate this = default shortcut when height * width = 0
2025-11-24 15:39:01 -08:00
Marcin Krystianc 8323145328 Eliminate this = default shortcut when height * width = 0 2025-11-24 14:52:57 -08:00
Sergio Pedri 02891cee63 Merge pull request #1140 from CommunityToolkit/dev/partial-props-support
Fix C# language version checks for `[ObservableProperty]`
2025-11-24 14:52:22 -08:00
Sergio Pedri 27d43c1188 Update C# language version to 14.0 in test project
Changed the LangVersion property from 'preview' to '14.0' in the CommunityToolkit.Mvvm.Roslyn5000.UnitTests.csproj file to explicitly target C# 14.0 for test builds.
2025-11-24 14:30:28 -08:00
Sergio Pedri ab4e3c21ac Remove Roslyn 5.0.0 workaround and update test dependency
Eliminated the temporary workaround for Roslyn 5.0.0 in the props file and updated the test project's Microsoft.CodeAnalysis.CSharp.Workspaces package reference from 5.0.0-2.final to 5.0.0. This aligns the configuration with the stable Roslyn release.
2025-11-24 14:28:58 -08:00
Sergio Pedri ea014da0fe Add C# 14 partial property tests and fix formatting
Introduces new unit tests for ObservableProperty with value types on partial properties using C# 14 and Roslyn 5.0.0 or greater. Also updates formatting in diagnostics tests for consistency and readability.
2025-11-24 14:28:58 -08:00
Sergio Pedri dffc56d7ee Add Roslyn5000 unit test project and fix project reference
Added CommunityToolkit.Mvvm.SourceGenerators.Roslyn5000.UnitTests project to the solution and corrected the project reference in CommunityToolkit.Mvvm.csproj to point to the correct Roslyn5000 source generator. This enables testing for Roslyn 5.0.0 support.
2025-11-24 14:28:58 -08:00
Sergio Pedri 3d97ed279f Add Roslyn 5.0.0 unit test project
Introduces CommunityToolkit.Mvvm.Roslyn5000.UnitTests.csproj targeting net472, net8.0, and net9.0. Updates the solution file to include the new test project for Roslyn 5.0.0 compatibility testing.
2025-11-24 14:28:58 -08:00
Sergio Pedri 272a9749a7 Update analyzer for C# 14.0 language version support
Renamed RequiresCSharpLanguageVersionPreviewAnalyzer to RequiresCSharpLanguageVersion14OrPreviewAnalyzer and updated logic to check for C# 14.0 or preview language versions. Adjusted generator and unit tests to reference the new analyzer and updated version checks for compatibility with Roslyn 5.0.0 or greater.
2025-11-24 14:28:58 -08:00
Sergio Pedri 6ae2439606 Add Roslyn 5.0 source generator and code fixer support
Added project references and packaging entries for Roslyn 5.0 source generators and code fixers to support analyzers for the latest Roslyn version.
2025-11-24 14:28:58 -08:00
Sergio Pedri 8f23f79c18 Update summary for DiagnosticsExtensions class
Revised the XML summary comment to clarify that the extension methods are for working with diagnostics from incremental generator pipelines, rather than specifically for GeneratorExecutionContext.
2025-11-24 14:28:58 -08:00
Sergio Pedri 55f39c2d75 Update Roslyn 5.0 support in source generators
Refactored the Roslyn 5000 project to import shared props and projitems files. Added support for the ROSLYN_5_0_0_OR_GREATER constant, updated NoWarn conditions for RS2003, and introduced a temporary workaround for Roslyn 5.0.0 versioning in the props file.
2025-11-24 14:28:58 -08:00
Sergio Pedri c62a26480b Add Roslyn5000 source generator project to solution
Created a new CommunityToolkit.Mvvm.SourceGenerators.Roslyn5000 project targeting netstandard2.0 and added it to the solution file.
2025-11-24 14:28:58 -08:00
Sergio Pedri 8b54ba568c Add C# 14.0 support for ObservableProperty on partial properties
Updated the ObservableProperty generator and diagnostics to allow usage with C# 14.0 or 'preview' language versions, not just 'preview'. Added a new helper method for language version comparison and updated diagnostic descriptors and analyzer logic to reflect the new minimum version requirement.
2025-11-24 14:28:58 -08:00
Sergio Pedri 67889e8ea2 Merge pull request #1144 from CommunityToolkit/dev/net10-sdk
Update to .NET 10 SDK, add .NET 10 TFM to test projects
2025-11-24 14:26:06 -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 07062f4301 Update to .NET SDK 10 and revise toolkit requirements
Bump .NET SDK version to 10.0.100 in global.json and update NuGet operations to use 10.0.x in CI workflow. Simplify MVVM Toolkit error message to recommend using the latest .NET SDK version.
2025-11-24 13:52:06 -08:00
Sergio Pedri 65b1a3242f Merge pull request #1047 from CommunityToolkit/dev/update-deps
Update NuGet packages and Windows SDK props
2025-11-10 13:40:44 -08:00
Sergio Pedri 5f2f8174fb Update NuGet packages to latest stable 2025-11-10 12:20:12 -08:00
Sergio Pedri 85d26bf421 Update NuGet packages to latest stable 2025-11-10 12:17:43 -08:00
Sergio Pedri e5ada2ebf1 Fix warning for 'Asn1' package 2025-11-10 12:16:28 -08:00
Sergio Pedri 013b10cd71 Update NuGet packages to latest stable 2025-11-10 11:56:58 -08:00
Sergio Pedri 9be2ae6ee7 Update NuGet packages to latest stable 2025-11-10 11:55:49 -08:00
Sergio Pedri 38c6f4a899 Update CsWinRT references 2025-11-10 11:54:56 -08:00
Sergio Pedri 1abeff602b Mark more members as 'readonly' 2025-11-10 11:54:56 -08:00
Sergio Pedri 3541038a91 Merge pull request #1137 from CommunityToolkit/dev/update-mestest
Update MSTest to latest
2025-11-10 11:54:20 -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 8ef70099d8 Refactor assertion in ObservableValidator test
Replaces Assert.IsTrue(!...) with Assert.IsFalse(...) for clarity in the Test_ObservableValidator_ValidateReturn test.
2025-11-09 18:41:43 -08:00
Sergio Pedri c75df26eea Assign Assert results to discard in unit test
Updated assertions in Test_RelayCommandAttribute_WithPartialCommandMethodDefinitions to assign results to the discard variable, improving code clarity and suppressing possible warnings about unused return values.
2025-11-09 18:37:55 -08:00
Sergio Pedri 4cc23d4568 Replace Assert.AreEqual with Assert.HasCount in tests
Updated unit tests in Test_ObservableValidator.cs to use Assert.HasCount instead of Assert.AreEqual for collection count assertions. This improves clarity and consistency in test assertions.
2025-11-09 18:37:22 -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 0b0e19c97a Merge pull request #1136 from CommunityToolkit/dev/update-mstest
Migrate to new MSTest APIs to prepare for 4.0.x
2025-11-07 17:39:04 -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 0892002d0c Don't use '[ExpectedException]' in Diagnostics tests 2025-11-07 13:22:54 -08:00
Sergio Pedri c1555a7e5d Don't use '[ExpectedException]' in MVVM tests 2025-11-07 13:22:54 -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 2388b9aece Merge pull request #1081 from CommunityToolkit/user/sergiopedri/handle-canexecute-overrides
Handle 'CanExecute' with method overrides
2025-11-06 11:03:22 -08:00
Sergio Pedri 7d4d6ec84b Handle 'CanExecute' with method overrides 2025-11-06 10:33:29 -08:00
Sergio Pedri 95043f57b3 Merge pull request #1120 from JamesYFC/fix/equatable-array-equals
fix object.Equals for EquatableArray
2025-11-06 10:33:16 -08:00
Sergio Pedri dfa1d88829 Merge pull request #1134 from CommunityToolkit/dev/remove-net7.0
Remove .NET 7 TFM
2025-11-06 10:32:48 -08:00
Sergio Pedri 77149455ba Update codebase to target .NET 8.0 and remove .NET 7.0
Replaces all conditional compilation checks for NET7_0_OR_GREATER with NET8_0_OR_GREATER and removes .NET 7.0 from the target frameworks in the project file. This ensures the codebase is aligned with .NET 8.0 features and APIs, simplifying maintenance and leveraging the latest platform improvements.
2025-11-05 20:27:11 -08:00
Sergio Pedri 90eec1b95a Merge pull request #1133 from CommunityToolkit/dev/slnx-migrate
Migrate solution to '.slnx' format
2025-11-05 20:26:48 -08:00
James 235bf81c15 fix object.Equals for EquatableArray 2025-11-05 20:07:35 -08:00