You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Build #RR-232.9921.62, built on September 15, 2023
Runtime version: 17.0.8+7-b1000.22 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 13.5.2
Problem description
This is a blocker for my migration to Rust Rover...
I have a build script that generates a module containing lots of Rust structs and enums. This works nicely.
However, I want to keep the tests for the generated code separate from the business logic that uses the code, so rather than having an inline test module at the end of the business logic module, I create a separate unit_tests.rs module containing all the tests, then simply finish the business logic module with:
#[cfg(test)]pubmod unit_tests;
All my Rust projects that use build scripts are structured this way because it makes the code easier to work with as there are often significantly more source lines of code related to testing than there are related to the business logic.
A consequence of this is that the same include!() macro call must be made in both main.rs and unit_tests.rs.
This code structure works fine in VS Code, but RR only evaluates the include!() macro in unit_tests.rs, then throws its toys out of the pram when it encounters the include!() macro call in main.rs
Environment
Problem description
This is a blocker for my migration to Rust Rover...
I have a build script that generates a module containing lots of Rust
struct
s andenum
s. This works nicely.However, I want to keep the tests for the generated code separate from the business logic that uses the code, so rather than having an inline test module at the end of the business logic module, I create a separate
unit_tests.rs
module containing all the tests, then simply finish the business logic module with:All my Rust projects that use build scripts are structured this way because it makes the code easier to work with as there are often significantly more source lines of code related to testing than there are related to the business logic.
A consequence of this is that the same
include!()
macro call must be made in bothmain.rs
andunit_tests.rs
.This code structure works fine in VS Code, but RR only evaluates the
include!()
macro inunit_tests.rs
, then throws its toys out of the pram when it encounters theinclude!()
macro call inmain.rs
Steps to reproduce
See the coding https://github.com/lighthouse-no/parse-sap-odata-demo
The text was updated successfully, but these errors were encountered: