-
Notifications
You must be signed in to change notification settings - Fork 77
Rust::com Integration test cases for Rust COM-API #237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
castler
merged 8 commits into
eclipse-score:main
from
bharatGoswami8:integration_test_cases
Apr 9, 2026
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
acabd76
Rust::com Integration test cases for primitive and user defined type
bharatGoswami8 39eee67
Rust::com Created macro for test-case
bharatGoswami8 69fc621
Rust::com Integration test case update
bharatGoswami8 a3e40fc
Rust::com Update the test cases
bharatGoswami8 fcda669
Rust::com Add integration test for validating CPP and rust memory
bharatGoswami8 2bbb4c1
Rust::com Integration test case update for rust apis
bharatGoswami8 c88e7c9
Rust::com Integration test case for rust apis
bharatGoswami8 63d9c6f
Rust::com Intergration test case update for rust API
bharatGoswami8 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,121 @@ | ||
| /******************************************************************************* | ||
| * Copyright (c) 2026 Contributors to the Eclipse Foundation | ||
| * | ||
| * See the NOTICE file(s) distributed with this work for additional | ||
| * information regarding copyright ownership. | ||
| * | ||
| * This program and the accompanying materials are made available under the | ||
| * terms of the Apache License Version 2.0 which is available at | ||
| * https://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| *******************************************************************************/ | ||
|
|
||
| #ifndef SCORE_MW_COM_TEST_BASIC_RUST_API_COM_API_GEN_H | ||
| #define SCORE_MW_COM_TEST_BASIC_RUST_API_COM_API_GEN_H | ||
|
|
||
| // Re-export the BigData interface types (BigDataProxy / BigDataSkeleton) that are | ||
| // already defined in big_datatype.h | ||
| #include "score/mw/com/test/common_test_resources/big_datatype.h" | ||
|
|
||
| namespace score::mw::com::test | ||
| { | ||
| /// Combined payload carrying every primitive type in a single struct. | ||
| /// Field order follows descending alignment to eliminate padding bytes. | ||
| struct MixedPrimitivesPayload | ||
| { | ||
| uint64_t u64_val; | ||
| int64_t i64_val; | ||
| uint32_t u32_val; | ||
| int32_t i32_val; | ||
| float f32_val; | ||
| uint16_t u16_val; | ||
| int16_t i16_val; | ||
| uint8_t u8_val; | ||
| int8_t i8_val; | ||
| bool flag; | ||
| }; | ||
|
|
||
| struct SimpleStruct | ||
| { | ||
| uint32_t id; | ||
| }; | ||
|
|
||
| struct NestedStruct | ||
| { | ||
| uint32_t id; | ||
| SimpleStruct simple; | ||
| float value; | ||
| }; | ||
|
|
||
| struct Point | ||
| { | ||
| float x; | ||
| float y; | ||
| }; | ||
|
|
||
| struct Point3D | ||
| { | ||
| float x; | ||
| float y; | ||
| float z; | ||
| }; | ||
|
|
||
| struct SensorData | ||
| { | ||
| uint16_t sensor_id; | ||
| float temperature; | ||
| float humidity; | ||
| float pressure; | ||
| }; | ||
|
|
||
| struct VehicleState | ||
| { | ||
| float speed; | ||
| uint16_t rpm; | ||
| float fuel_level; | ||
| bool is_running; | ||
| uint32_t mileage; | ||
| }; | ||
|
|
||
| struct ArrayStruct | ||
| { | ||
| uint32_t values[5]; | ||
| }; | ||
|
|
||
| struct ComplexStruct | ||
| { | ||
| uint32_t count; | ||
| SimpleStruct simple; | ||
| NestedStruct nested; | ||
| Point point; | ||
| Point3D point3d; | ||
| SensorData sensor; | ||
| VehicleState vehicle; | ||
| ArrayStruct array; | ||
| }; | ||
|
|
||
| template <typename Trait> | ||
| class MixedPrimitivesInterface : public Trait::Base | ||
| { | ||
| public: | ||
| using Trait::Base::Base; | ||
| typename Trait::template Event<MixedPrimitivesPayload> mixed_event{*this, "mixed_event"}; | ||
| }; | ||
|
|
||
| template <typename Trait> | ||
| class ComplexStructInterface : public Trait::Base | ||
| { | ||
| public: | ||
| using Trait::Base::Base; | ||
| typename Trait::template Event<ComplexStruct> complex_event{*this, "complex_event"}; | ||
| }; | ||
|
|
||
| // Type aliases for proxy and skeleton | ||
| using MixedPrimitivesProxy = ::score::mw::com::AsProxy<MixedPrimitivesInterface>; | ||
| using MixedPrimitivesSkeleton = ::score::mw::com::AsSkeleton<MixedPrimitivesInterface>; | ||
| using ComplexStructProxy = ::score::mw::com::AsProxy<ComplexStructInterface>; | ||
| using ComplexStructSkeleton = ::score::mw::com::AsSkeleton<ComplexStructInterface>; | ||
| } // namespace score::mw::com::test | ||
|
|
||
| #endif // SCORE_MW_COM_TEST_BASIC_RUST_API_COM_API_GEN_H |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: what basic_rust_api means?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is a folder name where we kept rust com api related integration tests, keeping name com-api is so generic.