Skip to content
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

Add unit tests and read scenes from JSON file #18

Merged
merged 9 commits into from
Aug 18, 2024
Merged

Add unit tests and read scenes from JSON file #18

merged 9 commits into from
Aug 18, 2024

Conversation

soumyasen1809
Copy link
Owner

  • Add Unit tests for Vector3 and Color
  • Updated support to read spheres from JSON file (with Center Point, Radius, Material and other properties)
  • Addressed Cippy warnings

- Created initial structure for Unit Testing.
- Dependency on Mockall
- Vector3 and Color testing started

%UNIT_TEST
- Added Unit Tests for Vector3 and Color

%UNIT_TEST
- Added JSON file to read sphere properties and add them
to the scene.
- Parse JSON file with serde_json crate
- Balls can have any material with right color, center and radius

TODO: Reads only the first element of JSON

%SOFTWARE
- Complete JSON file is now parsed to read all spheres

%SOFTWARE
Fixes issue #16
- Input color value was outside the range 0-1.
- Now user can input color(r,g,b) from range (0,255)
in the JSON and the code will convert it to appropriate range
using the translate_color_to_scale fn

%SOFTWARE
Fixes issue #17
- Fixed clippy warnings and lint errors

%SOFTWARE
- Refactored main.rs to remove ball generation code
to another file in lib
- Refactored Cargo.toml as required

%SOFTWARE
- Minor refactoring and cleanup of codebase

%SOFTWARE
@soumyasen1809 soumyasen1809 added bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request labels Aug 18, 2024
@soumyasen1809 soumyasen1809 self-assigned this Aug 18, 2024
@soumyasen1809 soumyasen1809 merged commit 786bb29 into main Aug 18, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant