Skip to content

Commit

Permalink
Rename TableComponent into DummyComponent
Browse files Browse the repository at this point in the history
The name is a bit confusing. Now it's also consistent with other tests.
  • Loading branch information
Shatur committed Sep 3, 2024
1 parent 7729e74 commit cd09c24
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions tests/insertion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ fn table_storage() {
..Default::default()
}),
))
.replicate::<TableComponent>();
.replicate::<DummyComponent>();
}

server_app.connect_client(&mut client_app);
Expand All @@ -39,15 +39,15 @@ fn table_storage() {
server_app
.world_mut()
.entity_mut(server_entity)
.insert(TableComponent);
.insert(DummyComponent);

server_app.update();
server_app.exchange_with_client(&mut client_app);
client_app.update();

client_app
.world_mut()
.query_filtered::<(), With<TableComponent>>()
.query_filtered::<(), With<DummyComponent>>()
.single(client_app.world());
}

Expand Down Expand Up @@ -372,14 +372,14 @@ fn after_removal() {
..Default::default()
}),
))
.replicate::<TableComponent>();
.replicate::<DummyComponent>();
}

server_app.connect_client(&mut client_app);

let server_entity = server_app
.world_mut()
.spawn((Replicated, TableComponent))
.spawn((Replicated, DummyComponent))
.id();

server_app.update();
Expand All @@ -391,16 +391,16 @@ fn after_removal() {
server_app
.world_mut()
.entity_mut(server_entity)
.remove::<TableComponent>()
.insert(TableComponent);
.remove::<DummyComponent>()
.insert(DummyComponent);

server_app.update();
server_app.exchange_with_client(&mut client_app);
client_app.update();

client_app
.world_mut()
.query_filtered::<(), With<TableComponent>>()
.query_filtered::<(), With<DummyComponent>>()
.single(client_app.world());
}

Expand All @@ -417,12 +417,12 @@ fn before_started_replication() {
..Default::default()
}),
))
.replicate::<TableComponent>();
.replicate::<DummyComponent>();
}

server_app.connect_client(&mut client_app);

server_app.world_mut().spawn((Replicated, TableComponent));
server_app.world_mut().spawn((Replicated, DummyComponent));

server_app.update();
server_app.exchange_with_client(&mut client_app);
Expand All @@ -431,7 +431,7 @@ fn before_started_replication() {

let replicated_components = client_app
.world_mut()
.query_filtered::<(), With<TableComponent>>()
.query_filtered::<(), With<DummyComponent>>()
.iter(client_app.world())
.count();

Expand All @@ -453,7 +453,7 @@ fn before_started_replication() {

client_app
.world_mut()
.query_filtered::<(), With<TableComponent>>()
.query_filtered::<(), With<DummyComponent>>()
.single(client_app.world());
}

Expand All @@ -470,7 +470,7 @@ fn after_started_replication() {
..Default::default()
}),
))
.replicate::<TableComponent>();
.replicate::<DummyComponent>();
}

server_app.connect_client(&mut client_app);
Expand All @@ -486,7 +486,7 @@ fn after_started_replication() {
client_app.update();
server_app.exchange_with_client(&mut client_app);

server_app.world_mut().spawn((Replicated, TableComponent));
server_app.world_mut().spawn((Replicated, DummyComponent));

server_app.update();
server_app.exchange_with_client(&mut client_app);
Expand All @@ -495,7 +495,7 @@ fn after_started_replication() {

client_app
.world_mut()
.query_filtered::<(), With<TableComponent>>()
.query_filtered::<(), With<DummyComponent>>()
.single(client_app.world());
}

Expand All @@ -509,7 +509,7 @@ impl MapEntities for MappedComponent {
}

#[derive(Component, Deserialize, Serialize)]
struct TableComponent;
struct DummyComponent;

#[derive(Component, Deserialize, Serialize)]
#[component(storage = "SparseSet")]
Expand Down

0 comments on commit cd09c24

Please sign in to comment.