Comments (9)
Thank you so much
cool, I take then :) Can you assign to me please ?
from velo.
Few unit tests have been added here: #81, #85
(can be used as reference for future tests)
from velo.
Thanks for this information @StaffEngineer and sorry for the time. Question, to test button is with the file please button_handlers.rs ? i test each function ?
I work with wsl2 i can run test, but with cargo run i have an error a window open but close so fast just after
kevin@DESKTOP-FHCMTBM:~/project/rust/velo$ cargo r Finished dev [unoptimized + debuginfo] target(s) in 0.28s Running `target/debug/velo` 2023-05-05T14:40:35.778870Z INFO bevy_winit::system: Creating new window "Velo" (0v0) 2023-05-05T14:40:35.779588Z WARN winit::platform_impl::platform::x11::util::randr: XRandR reported that the display's 0mm in size, which is certifiably insane 2023-05-05T14:40:35.780099Z INFO winit::platform_impl::platform::x11::window: Guessed window scale factor: 1 2023-05-05T14:40:36.577861Z INFO bevy_render::renderer: AdapterInfo { name: "D3D12 (NVIDIA GeForce GTX 1650 Ti)", vendor: 0, device: 0, device_type: Other, driver: "", driver_info: "", backend: Gl } 2023-05-05T14:40:36.638833Z INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "Linux 20.04 Ubuntu", kernel: "5.15.90.1-microsoft-standard-WSL2", cpu: "Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz", core_count: "6", memory: "15.5 GiB" } 2023-05-05T14:40:36.697084Z ERROR wgpu_core::device: surface configuration failed: incompatible window kind thread 'main' panicked at 'Error in Surface::configure: invalid surface', /home/kevin/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.15.1/src/backend/direct.rs:316:9 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace thread 'Compute Task Pool (5)' panicked at 'A system has panicked so the executor cannot continue.: RecvError', /home/kevin/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_ecs-0.10.1/src/schedule/executor/multi_threaded.rs:194:60 thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', /home/kevin/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_tasks-0.10.1/src/task_pool.rs:376:49 thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', /home/kevin/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_render-0.10.1/src/pipelined_rendering.rs:136:45 thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /home/kevin/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_tasks-0.10.1/src/task_pool.rs:376:49 Segmentation fault
Thanks
Hi. Yes, you can test each function in button_handlers.rs
.
Regarding wsl2.. I can't help you much with it since I am on different platform, MacOS. I quickly googled what you can try to make it work, basically maybe you have to install some additional drivers (see https://github.com/bevyengine/bevy/blob/main/docs/linux_dependencies.md) or maybe try another graphics backend.
It could be related to bevyengine/bevy#4105
from velo.
Hello sorry for the delay, and thanks for your help.
I begin to create test for function change_color_pallette here
but is not good
test ui_plugin::button_handlers::test_change_color_pallete ... FAILED
test ui_plugin::resize_node::test_resize_entity_end ... ok
test ui_plugin::save_systems::tests::test_save_doc3 ... ok
test ui_plugin::save_systems::tests::test_save_doc2 ... ok
test ui_plugin::save_systems::tests::test_save_doc1 ... ok
failures:
---- ui_plugin::button_handlers::test_change_color_pallete stdout ----
thread 'ui_plugin::button_handlers::test_change_color_pallete' panicked at 'assertion failed: `(left == right)`
left: `Rgba { red: 0.0, green: 0.0, blue: 0.0, alpha: 0.0 }`,
right: `Rgba { red: 1.0, green: 0.0, blue: 0.0, alpha: 1.0 }`', src/ui_plugin/systems/button_handlers.rs:822:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
I think is due to bad init of ressource event or component, can you help me please ?
Thanks a lot
from velo.
We started adding tests. Let's add tests with new features and slowly/incrementally increase coverage. Feel free to open the issue to cover specific feature by tests.
from velo.
Hello :)
I am a beginner in rust, can I please take this issue?
Do you have any advice for the resolution?
Thanks
from velo.
@kevin-schmitt sure, we really need start adding tests. The problem we haven't set up any test infrastructure yet, so it may be a bit not that straightforward to add them. We use bevy
as the main tool, there is good example how to get started with systems testing in bevy: https://github.com/bevyengine/bevy/blob/main/tests/how_to_test_systems.rs
If you have any question or need help/advice just let me know.
from velo.
@kevin-schmitt I may start adding some tests in the near future... if you start to cover by tests some feature from the list above just let me know.
from velo.
Thanks for this information @StaffEngineer and sorry for the time.
Question, to test button is with the file please button_handlers.rs ? i test each function ?
I work with wsl2 i can run test, but with cargo run i have an error a window open but close so fast just after
kevin@DESKTOP-FHCMTBM:~/project/rust/velo$ cargo r
Finished dev [unoptimized + debuginfo] target(s) in 0.28s
Running `target/debug/velo`
2023-05-05T14:40:35.778870Z INFO bevy_winit::system: Creating new window "Velo" (0v0)
2023-05-05T14:40:35.779588Z WARN winit::platform_impl::platform::x11::util::randr: XRandR reported that the display's 0mm in size, which is certifiably insane
2023-05-05T14:40:35.780099Z INFO winit::platform_impl::platform::x11::window: Guessed window scale factor: 1
2023-05-05T14:40:36.577861Z INFO bevy_render::renderer: AdapterInfo { name: "D3D12 (NVIDIA GeForce GTX 1650 Ti)", vendor: 0, device: 0, device_type: Other, driver: "", driver_info: "", backend: Gl }
2023-05-05T14:40:36.638833Z INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "Linux 20.04 Ubuntu", kernel: "5.15.90.1-microsoft-standard-WSL2", cpu: "Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz", core_count: "6", memory: "15.5 GiB" }
2023-05-05T14:40:36.697084Z ERROR wgpu_core::device: surface configuration failed: incompatible window kind
thread 'main' panicked at 'Error in Surface::configure: invalid surface', /home/kevin/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.15.1/src/backend/direct.rs:316:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'Compute Task Pool (5)' panicked at 'A system has panicked so the executor cannot continue.: RecvError', /home/kevin/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_ecs-0.10.1/src/schedule/executor/multi_threaded.rs:194:60
thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', /home/kevin/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_tasks-0.10.1/src/task_pool.rs:376:49
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', /home/kevin/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_render-0.10.1/src/pipelined_rendering.rs:136:45
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /home/kevin/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_tasks-0.10.1/src/task_pool.rs:376:49
Segmentation fault
Thanks
from velo.
Related Issues (20)
- Hit detection is broken on camera move/camera zoom
- web app not work well in touch device HOT 1
- arrow cannot be deleted directly HOT 2
- A log history to support global undo and redo HOT 2
- ChatGPT integration 🤖
- Implement clone & fork note functionality 💫
- Create shadows shader
- Starting failed on Windows10 HOT 3
- Move to WebGPU for wasm target
- Fix z-index of arrows
- Change note's creation location
- Storage re-write and more 🚀
- Add note annotations
- Improve shadows shader
- Do not move note to cursor position during note movement, use cursor offset
- Allow selecting/removing particular drawing & allow drawing repositioning
- Insert new note into the closest empty space
- Move velo to the latest bevy_cosmic_edit API
- Save camera position per tab
- Panics on "Event<Blah>" text note content
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from velo.