News Releases

ReSharper C++ 2022.1: Updates for Unit Testing and Unreal Engine

ReSharper C++ 2022.1 is now available! It mainly addresses quality and performance issues but also brings a lot of updates for unit testing and Unreal Engine and improves the handling of implicit constructor calls.
ReSharper C++ 2022.1

The brand new build is available on our website, and all of our tools for Visual Studio can be downloaded via the Toolbox App.

DOWNLOAD RESHARPER C++ 2022.1

Unreal Engine

As you may know, ReSharper C++ is the backend of Rider for Unreal Engine, which is currently graduating the preview phase and is available in the new release of Rider. Give it a try and enjoy the familiar Unreal Engine features on all three major platforms!

ReSharper C++ 2022.1 introduces a brand new way to quickly consult the Unreal Engine documentation to get the details of a class, symbol, or function. You can now click Read more in the Quick Documentation pop-up (Ctrl+Shift+F1) to open the corresponding page in your browser.
Embedded links to the Unreal Engine documentation

We’ve improved how the Rename refactoring handles the Unreal Engine interface classes. When renaming interfaces, both the U and I classes will be renamed accordingly.
Rename the Unreal Engine interface classes

ReSharper C++ now substitutes the parameter names when you generate a member function signature from the Unreal Engine delegate.
Generate delegate function
You can now also generate delegate functions when the ThisClass typedef is used.

As this is a quality-focused release, we’d like to highlight some of the important Unreal-related fixes we’re delivering in this release:

  • The Unreal Engine 5 built-in preprocessor macros are now supported in the .Build.cs and .Target.cs files.
  • ReSharper no longer suggests the recent C# features that are not applicable in the .Build.cs and .Target.cs files on Unreal Engine 4.
  • ReSharper C++ now reads the list of valid reflection specifiers directly from the version of Unreal Engine which is currently in use, so it only offers you applicable items in code completion and displays up-to-date documentation.
  • There are no more issues caused by the DOREPLIFETIME_WITH_PARAMS_FAST and MARK_PROPERTY_DIRTY_FROM_NAME push model macros – ReSharper C++ now is aware of entities generated by the replication system, such as the ENetFields_Private enum.

Unit Testing

The Unreal Engine testing framework is now supported! ReSharper C++ discovers Unreal Engine unit tests and adds the corresponding action indicators next to each test in the editor to run or debug the test or the whole test suite. In the Unit Test Sessions window, you can review the results of the tests, and rerun failed, all, or specific tests.
Unreal Engine testing framework

Please note that there are a few known issues. For example, since StressFilter is ignored by Unreal Engine, ReSharper C++ doesn’t support stress tests. Spec tests and tests with the symbol are not supported either.

The new version of the Catch2 unit test framework brings significant changes. It’s now split into multiple headers and has a statically compiled library as its distribution model. This means you now have to include several headers, but the compilation time is improved. If you’d like to check out the updated Catch2 unit test framework, ReSharper C++ 2022.1 has full support to help you do so.
Catch2 v3

ReSharper C++ 2022.1 also includes updates for the latest releases of GoogleTest, Boost.Test, and doctest, as well as various unit testing fixes.

C++ support

ReSharper C++ is now better at handling implicit constructor calls, allowing you to find usages and navigate to the called constructor in more cases, including the following:

  • standard (make_unique/make_shared) and Unreal-specific (MakeShared/MakeUnique) smart pointer creation functions.
  • emplace-like container methods.
  • static_cast and c-style cast expressions.

ReSharper C++ now also shows you an overloading warning when an emplace-like function is called with incorrect arguments.
Warning for emplace_back

We’ve improved the multiline generation of boilerplate code for aggregate initialization using C++20 designated initializers. This feature was introduced in the previous release. You can now invoke completion on the next line if you want to see each initializer on a new line.
Multiline code generation for aggregate initialization

Formatting

There are a few formatting updates:

  • ReSharper C++ now treats the C++20 requires-expressions correctly, allowing you to configure spaces formatting via the Around ‘->’ in trailing return types option.
  • You can now use the new Line feed at the end of file option to control adding or removing a blank line from the end of files.

Those are all the highlights for today! The full list of fixed issues is available in our issue tracker. In addition, more changes are coming from the ReSharper platform; for example, you can now autodetect syntax style settings for C# files.

We encourage you to give ReSharper C++ 2022.1 a try. If you have an active subscription, you can update today. Otherwise, we invite you to start your free 30-day trial to check out the new features and share what you think!

DOWNLOAD RESHARPER C++ 2022.1

Your ReSharper C++ team
JetBrains
The Drive to Develop

image description