Commit Graph
40 Commits
Author SHA1 Message Date
Kirill Bulatov f86bd3de7f Suppress unused vars warning generated by gpui macro 2023-11-04 13:54:37 +02:00
Nathan Sobo b2968c2d11 Eliminate PaintContext 2023-09-11 09:00:59 -06:00
Nathan Sobo 950ac4fbc6 Eliminate LayoutContext 2023-09-11 08:47:00 -06:00
Nathan Sobo 20da2b4621 Checkpoint 2023-09-08 16:25:10 -06:00
Max Brunsfeld 15265e427a Extract randomized test infrastructure for use in other tests 2023-09-06 14:08:43 -07:00
Nathan Sobo ec9bebc7f4 Merge branch 'main' into divs 2023-08-22 16:35:56 -06:00
Kirill Bulatov 6d3e568fdc Move gpui derives tests into gpui crate to avoid dependency cycles
`cargo run` on Zed project leads to rust-analyzer evantually emitting

`[ERROR project_model::workspace] cyclic deps:
gpui_macros(Idx::<CrateData>(269)) -> gpui(Idx::<CrateData>(264)),
alternative path: gpui(Idx::<CrateData>(264)) ->
gpui_macros(Idx::<CrateData>(269))`

error after loading the project.

The PR fixes this by moving away the test to the "root" project.
2023-08-16 10:19:20 +03:00
Nathan SoboandMikayla Maki 64f61d293a Merge branch 'main' into taffy
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2023-08-14 13:50:21 -06:00
Mikayla 3a9e050232 Add a compile test for the element derive 2023-08-11 18:00:12 -07:00
Nathan Sobo bb9591415f WIP 2023-08-10 10:26:48 -06:00
Nathan Sobo 96f0e2f23f WIP 2023-08-01 20:53:15 -06:00
Nathan Sobo 2db14b6c92 WIP 2023-07-26 12:54:23 -06:00
Nathan Sobo 7148b06bc4 WIP 2023-07-25 16:33:58 -06:00
Nathan Sobo b2d85f95c2 WIP 2023-07-24 23:27:14 -06:00
Nathan Sobo 19e8591069 WIP 2023-07-17 16:48:31 -06:00
Nathan Sobo a189b17963 Add a derive macro for Element
To turn any struct into a composite element, you can implement a render method
with the following signature:

fn render<V: View>(&mut self, view: &mut V, cx: &mut ViewContext<V>) -> AnyElement<V>;

Then add #[derive(Element)] to the struct definition.

This will make it easier to introduce higher-level components that are expressed in
terms of other elements.
2023-06-25 07:51:50 -06:00
Antonio Scandurra 4e0ab2f8d0 Move methods querying window state into AsyncAppContext 2023-05-02 19:38:48 +02:00
Antonio Scandurra 41134f0ebb Make production code compile again 2023-04-17 12:33:33 +02:00
Max Brunsfeld 4f02cbb8e1 Add an 'on_failure' attribute to gpui tests
This lets us perform a finalization step when a randomized test fails.
2023-04-03 18:16:08 -07:00
Mikayla Maki fc7532d74d Added complete scripts for generating third party license files 2023-01-23 12:47:12 -08:00
Joseph Lyons d9a7e1fed6 Appease clippy 2023-01-01 23:50:45 -05:00
Antonio Scandurra b5ede1d2d9 Merge branch 'main' into reconnections-2 2022-12-05 19:18:40 +01:00
Kay SimmonsandMikayla Maki 18494210e5 Added sql! proc macro which checks syntax errors on sql code and displays them with reasonable underline locations
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-12-03 16:06:01 -08:00
Antonio Scandurra 7d91ae8d03 Introduce a new detect_nondeterminism = true attribute to gpui::test 2022-11-28 19:01:28 +01:00
Kay Simmons 394517dbc6 Merge pull request #1685 from zed-industries/vim-text-objects
Vim Text Objects and Numeric Repitions
2022-10-11 16:36:19 -07:00
K Simmons 055a8fe14a Fixed some neovim test context issues, added repeated commands in vim mode, and ported some tests to use the neovim testing strategy 2022-10-08 21:52:07 -07:00
Antonio Scandurra 6597a5183a Move incoming calls into ActiveCall 2022-10-06 09:50:26 +02:00
ForLoveOfCatsandMikayla fbea44bc5c One big cleanup pass of clippy lints
Co-authored-by: Mikayla <mikayla@zed.dev>
2022-08-10 16:51:01 -07:00
Antonio Scandurra 5f3d58180f Allow taking an Arc<Deterministic> in [gpui::test]-decorated tests 2022-04-11 13:42:30 +02:00
Max Brunsfeld 3a1a9ecb45 Disable doctests for all libraries
We don't use them, and they add a lot of noise to the test output
when running all tests in the workspace.
2022-03-03 16:15:56 -08:00
Antonio ScandurraandNathan Sobo 9a3147043a Make TestAppContext and its dependencies available only in tests
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-01 17:01:52 +01:00
Antonio Scandurra 79568c471a Pass a reference to TestAppContext in tests
This allows us to drop the context *after* we ran all futures to
completion and that's crucial otherwise we'll never drop entities
and/or flush effects.
2022-03-01 12:01:02 +01:00
Max BrunsfeldandNathan Sobo fe6bc5e188 Start work on detecting leaked handles in tests
For now, just track models. Tests fail because we don't
yet clear the app contexts at the right time.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-28 22:02:43 -08:00
Antonio Scandurra 1ea3c507de Clean db pool on drop only if assertions fail or it's the last iteration 2022-02-16 15:07:41 +01:00
Max BrunsfeldandNathan Sobo 4b081bd128 Use Rust 2021 edition in all crates
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-26 12:50:31 -08:00
Antonio Scandurra bbe3ca6d43 WIP: Start restructuring executor 2022-01-24 18:49:20 +01:00
Nathan SoboandMax Brunsfeld 93322a4858 Name the root file of every crate after the crate to ease navigation
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-11-30 12:46:39 -07:00
Antonio Scandurra f3583120de Use the same test::run_test function for async gpui::tests 2021-10-05 18:04:22 +02:00
Antonio ScandurraandNathan Sobo 5aeb48a234 Minimize code generation for synchronous gpui::test macro
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-10-05 17:47:46 +02:00
Nathan SoboandMax Brunsfeld a1b11e8907 Move all crates to a top-level crates folder
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-10-04 13:22:21 -06:00