Skip to content
This repository was archived by the owner on Jul 5, 2025. It is now read-only.

Commit 4f285cb

Browse files
committed
fix: cyclic deps
1 parent 6cd50c9 commit 4f285cb

File tree

8 files changed

+19
-23
lines changed

8 files changed

+19
-23
lines changed

crates/sweet_test/Cargo.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,6 @@ console_error_panic_hook.workspace = true
6161
getrandom.workspace = true # enable js feature
6262
forky = { workspace = true, features = ["web"] }
6363

64-
[dev-dependencies]
65-
sweet = { workspace = true, features = ["test"] }
66-
67-
6864
[[test]]
6965
name = "hello_test"
7066
path = "test_examples/hello_test.rs"

crates/sweet_test/src/_matchers/bevy_matchers/observer_utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use bevy::prelude::*;
2-
use sweet::prelude::*;
2+
use crate::prelude::*;
33

44
type Func<T> = MockFunc<T, T, fn(T) -> T>;
55

crates/sweet_test/test_examples/hello_async.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
//! example usage of async tests
22
#![cfg_attr(test, feature(test, custom_test_frameworks))]
3-
#![cfg_attr(test, test_runner(sweet::test_runner))]
3+
#![cfg_attr(test, test_runner(sweet_test::test_runner))]
44

5-
#[sweet::test]
5+
#[sweet_test::test]
66
#[ignore = "it returns error"]
77
async fn returns_err() -> Result<(), String> { Err("foo".to_string()) }
88

@@ -13,13 +13,13 @@ async fn dummy2() {
1313
sweet_core::sleep_secs(1).await;
1414
panic!("waddup")
1515
}
16-
#[sweet::test]
16+
#[sweet_test::test]
1717
// #[should_panic]
1818
async fn dummy3() { sweet_core::sleep_secs(1).await; }
19-
#[sweet::test]
19+
#[sweet_test::test]
2020
// #[should_panic]
2121
async fn dummy4() { sweet_core::sleep_secs(1).await; }
22-
#[sweet::test]
22+
#[sweet_test::test]
2323
#[should_panic]
2424
async fn dummy5() {
2525
sweet_core::sleep_secs(1).await;

crates/sweet_test/test_examples/hello_test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! example configuration for a test, just two lines and you're good to go
22
#![cfg_attr(test, feature(test, custom_test_frameworks))]
3-
#![cfg_attr(test, test_runner(sweet::test_runner))]
4-
use sweet::prelude::*;
3+
#![cfg_attr(test, test_runner(sweet_test::test_runner))]
4+
use sweet_test::prelude::*;
55

66
#[test]
77
fn it_succeeds() { assert!(true) }

crates/sweet_test/tests/macros.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! example usage of async tests
22
#![cfg_attr(test, feature(test, custom_test_frameworks))]
3-
#![cfg_attr(test, test_runner(sweet::test_runner))]
3+
#![cfg_attr(test, test_runner(sweet_test::test_runner))]
44
use anyhow::Result;
55

66
#[test]
@@ -10,19 +10,19 @@ fn its_ignored_sync() { panic!("foo") }
1010
#[should_panic = "cos its fun"]
1111
fn it_panics_sync() { panic!("foo") }
1212

13-
#[sweet::test]
13+
#[sweet_test::test]
1414
async fn it_passes() {}
15-
#[sweet::test]
15+
#[sweet_test::test]
1616
async fn it_returns_ok() -> Result<(), String> { Ok(()) }
1717
#[test]
1818
#[ignore = "it returns error"]
1919
fn it_returns_err() -> Result<(), String> { Err("foo".to_string()) }
2020

21-
#[sweet::test]
21+
#[sweet_test::test]
2222
#[ignore = "it returns error"]
2323
async fn it_returns_err_async() -> Result<(), String> { Err("foo".to_string()) }
2424

25-
#[sweet::test]
25+
#[sweet_test::test]
2626
#[should_panic]
2727
async fn it_panics() { panic!("foo") }
2828

@@ -34,11 +34,11 @@ async fn it_tokio_waits_then_panics() {
3434
sweet_core::sleep_secs(1).await;
3535
panic!("waddup")
3636
}
37-
#[sweet::test]
37+
#[sweet_test::test]
3838
// #[should_panic]
3939
async fn it_sleeps() { sweet_core::sleep_secs(1).await; }
4040

41-
#[sweet::test]
41+
#[sweet_test::test]
4242
#[should_panic]
4343
async fn it_sleeps_then_panics() {
4444
sweet_core::sleep_secs(1).await;

crates/sweet_test/tests/scratchpad.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![cfg_attr(test, feature(test, custom_test_frameworks))]
2-
#![cfg_attr(test, test_runner(sweet::test_runner))]
2+
#![cfg_attr(test, test_runner(sweet_test::test_runner))]
33

44

55
// #[tokio::main]

crates/sweet_test/tests/single_async.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! example usage of async tests
22
#![cfg_attr(test, feature(test, custom_test_frameworks))]
3-
#![cfg_attr(test, test_runner(sweet::test_runner))]
3+
#![cfg_attr(test, test_runner(sweet_test::test_runner))]
44

55
// ensure we are not nesting runtimes or get this error:
66
// Cannot start a runtime from within a runtime. This happens because a function (like `block_on`) attempted to block the current thread while the thread is being used to drive asynchronous tasks.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! used for cargo expand
22
#![cfg_attr(test, feature(test, custom_test_frameworks))]
3-
#![cfg_attr(test, test_runner(sweet::test_runner))]
3+
#![cfg_attr(test, test_runner(sweet_test::test_runner))]
44

5-
#[sweet::test]
5+
#[sweet_test::test]
66
#[should_panic]
77
async fn it_panics() { panic!("foo") }

0 commit comments

Comments
 (0)