Skip to content

Commit

Permalink
Refactor test names (#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
Veetaha authored Nov 24, 2024
1 parent 7d08010 commit fed308f
Show file tree
Hide file tree
Showing 14 changed files with 49 additions and 49 deletions.
4 changes: 2 additions & 2 deletions bon/tests/integration/builder/attr_crate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ fn test_struct() {
}

#[test]
fn test_free_fn() {
fn test_function() {
{
#[builder(
crate = crate::builder::attr_crate::lyra,
Expand Down Expand Up @@ -80,7 +80,7 @@ fn test_free_fn() {
}

#[test]
fn test_assoc_method() {
fn test_method() {
{
struct Sut;

Expand Down
4 changes: 2 additions & 2 deletions bon/tests/integration/builder/attr_default.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ mod interaction_with_positional_members {
}

#[test]
fn test_free_fn() {
fn test_function() {
#[builder]
#[allow(clippy::type_complexity)]
fn sut(
Expand Down Expand Up @@ -324,7 +324,7 @@ mod interaction_with_positional_members {
}

#[test]
fn test_assoc_method() {
fn test_method() {
struct Sut;

#[bon]
Expand Down
16 changes: 8 additions & 8 deletions bon/tests/integration/builder/attr_derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ mod generics {
}

#[test]
fn test_free_fn() {
fn test_function() {
#[builder(derive(Clone, Debug))]
fn sut<T>(_arg1: T) {}

Expand All @@ -136,7 +136,7 @@ mod generics {
}

#[test]
fn test_assoc_method() {
fn test_method() {
#[derive(Clone, Debug)]
struct Sut<T>(T);

Expand Down Expand Up @@ -193,7 +193,7 @@ mod positional_members {
}

#[test]
fn test_free_fn() {
fn test_function() {
#[builder(derive(Clone, Debug))]
#[allow(unused_variables)]
fn sut(
Expand All @@ -214,7 +214,7 @@ mod positional_members {
}

#[test]
fn test_assoc_method() {
fn test_method() {
#[derive(Debug)]
struct Sut;

Expand Down Expand Up @@ -286,15 +286,15 @@ mod attr_bounds_empty {
}

#[test]
fn test_free_fn() {
fn test_function() {
#[builder(derive(Clone(bounds()), Debug))]
fn sut<T>(_arg: &T) {}

let _ = sut::<NoTraitImpls>().arg(&NoTraitImpls).clone();
}

#[test]
fn test_assoc_method() {
fn test_method() {
#[derive(Clone, Debug)]
struct Sut;

Expand Down Expand Up @@ -325,7 +325,7 @@ mod attr_bounds_non_empty {
}

#[test]
fn test_free_fn() {
fn test_function() {
#[builder(derive(Clone(bounds(&'a T: Clone, &'a &'a T: Clone)), Debug))]
#[allow(clippy::needless_lifetimes, single_use_lifetimes)]
fn sut<'a, T>(_arg: &'a T) {}
Expand All @@ -334,7 +334,7 @@ mod attr_bounds_non_empty {
}

#[test]
fn test_assoc_method() {
fn test_method() {
#[derive(Clone, Debug)]
struct Sut;

Expand Down
4 changes: 2 additions & 2 deletions bon/tests/integration/builder/attr_overwritable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ mod smoke {
}

#[test]
fn test_free_fn() {
fn test_function() {
#[builder]
fn sut(
#[builder(overwritable)] a: u32,
Expand All @@ -41,7 +41,7 @@ mod smoke {
}

#[test]
fn test_assoc_method() {
fn test_method() {
struct Sut;

#[bon]
Expand Down
8 changes: 4 additions & 4 deletions bon/tests/integration/builder/attr_required.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ mod member_level {
}

#[test]
fn test_free_fn() {
fn test_function() {
#[builder]
fn sut<T: fmt::Debug>(
#[builder(required)] regular: Option<u32>,
Expand All @@ -76,7 +76,7 @@ mod member_level {
}

#[test]
fn test_assoc_method() {
fn test_method() {
struct Sut;

#[bon]
Expand Down Expand Up @@ -184,7 +184,7 @@ mod attr_on {
}

#[test]
fn test_free_fn() {
fn test_function() {
#[builder(on(_, required))]
fn sut<T: fmt::Debug>(
#[builder(start_fn)] start_fn: u32,
Expand Down Expand Up @@ -216,7 +216,7 @@ mod attr_on {
}

#[test]
fn test_assoc_method() {
fn test_method() {
struct Sut;

#[bon]
Expand Down
10 changes: 5 additions & 5 deletions bon/tests/integration/builder/attr_setters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ mod name {
}

#[test]
fn test_free_fn() {
fn test_function() {
#[builder]
fn sut(
#[builder(setters(name = arg1_renamed))] _arg1: bool,
Expand Down Expand Up @@ -65,7 +65,7 @@ mod name {
}

#[test]
fn test_assoc_method() {
fn test_method() {
struct Sut;

#[bon]
Expand Down Expand Up @@ -211,7 +211,7 @@ mod option_fn_name_and_some_fn_name {
}

#[test]
fn test_free_fn() {
fn test_function() {
#[builder(derive(Clone))]
fn sut(
#[builder(setters(some_fn = arg1_some))] _arg1: Option<()>,
Expand Down Expand Up @@ -269,7 +269,7 @@ mod option_fn_name_and_some_fn_name {
}

#[test]
fn test_assoc_method() {
fn test_method() {
struct Sut;

#[bon]
Expand Down Expand Up @@ -421,7 +421,7 @@ mod self_references_in_docs {
}

#[test]
fn test_free_fn() {
fn test_function() {
/// [`Self`] link
#[builder]
fn sut(
Expand Down
4 changes: 2 additions & 2 deletions bon/tests/integration/builder/attr_top_level_start_fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::prelude::*;
use core::fmt;

#[test]
fn test_assoc_method() {
fn test_method() {
{
struct Sut;

Expand Down Expand Up @@ -49,7 +49,7 @@ fn test_assoc_method() {
}

#[test]
fn test_free_fn() {
fn test_function() {
{
#[builder(start_fn(name = sut_builder))]
fn sut(arg1: bool, arg2: u32) -> impl fmt::Debug {
Expand Down
4 changes: 2 additions & 2 deletions bon/tests/integration/builder/attr_with/from_iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ fn test_struct() {
}

#[test]
fn test_free_fn() {
fn test_function() {
#[builder(derive(Clone))]
fn sut(
#[builder(with = <_>::from_iter)] vec: Vec<i32>,
Expand Down Expand Up @@ -244,7 +244,7 @@ fn test_free_fn() {
}

#[test]
fn test_assoc_method() {
fn test_method() {
struct Sut;

#[bon]
Expand Down
4 changes: 2 additions & 2 deletions bon/tests/integration/builder/attr_with/single_arg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ fn test_struct() {
}

#[test]
fn test_free_fn() {
fn test_function() {
#[builder(derive(Clone))]
fn sut<T: Default + Clone + fmt::Debug>(
#[builder(with = |x: u32| x + 1)] required: u32,
Expand Down Expand Up @@ -222,7 +222,7 @@ fn test_free_fn() {
}

#[test]
fn test_assoc_method() {
fn test_method() {
struct Sut;

#[bon]
Expand Down
4 changes: 2 additions & 2 deletions bon/tests/integration/builder/attr_with/some.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ fn test_struct() {
}

#[test]
fn test_free_fn() {
fn test_function() {
{
#[builder(derive(Clone))]
fn sut<T: fmt::Debug>(
Expand Down Expand Up @@ -98,7 +98,7 @@ fn test_free_fn() {
}

#[test]
fn test_assoc_method() {
fn test_method() {
struct Sut;

#[bon]
Expand Down
8 changes: 4 additions & 4 deletions bon/tests/integration/builder/name_conflicts/builder_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ mod conflicts_in_bodies {

#[test]
#[allow(clippy::items_after_statements)]
fn test_free_fn() {
fn test_function() {
struct S;
struct State;
struct BuilderState;
Expand Down Expand Up @@ -123,7 +123,7 @@ mod conflicts_in_bodies {

#[test]
#[allow(clippy::items_after_statements)]
fn test_assoc_method() {
fn test_method() {
struct State;
struct BuilderState;

Expand Down Expand Up @@ -282,7 +282,7 @@ mod conflicts_in_attrs {
}

#[test]
fn test_free_fn() {
fn test_function() {
{
#[builder]
fn sut(#[builder(with = |s: S| s.s())] _field: u32) {}
Expand All @@ -303,7 +303,7 @@ mod conflicts_in_attrs {
}

#[test]
fn test_assoc_method() {
fn test_method() {
{
struct Sut;

Expand Down
8 changes: 4 additions & 4 deletions bon/tests/integration/builder/name_conflicts/generics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ mod lifetimes {
use crate::prelude::*;

#[test]
fn test_free_fn() {
fn test_function() {
#[builder]
#[allow(
single_use_lifetimes,
Expand All @@ -23,7 +23,7 @@ mod lifetimes {
}

#[test]
fn test_assoc_method() {
fn test_method() {
#[derive(Default)]
#[allow(dead_code)]
struct Sut<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h>(
Expand Down Expand Up @@ -51,7 +51,7 @@ mod impl_trait {
use crate::prelude::*;

#[test]
fn test_free_fn() {
fn test_function() {
struct I1;
type I2 = I1;

Expand Down Expand Up @@ -82,7 +82,7 @@ mod impl_trait {
}

#[test]
fn test_assoc_method() {
fn test_method() {
struct I1;
type I2 = I1;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::prelude::*;

#[test]
fn test_free_fn() {
fn test_function() {
#[builder]
fn sut(state: u32, member_state: u32, unset: u32, empty: u32) {
let _ = (state, member_state, unset, empty);
Expand Down Expand Up @@ -30,7 +30,7 @@ fn test_struct() {
}

#[test]
fn test_assoc_method() {
fn test_method() {
struct Sut;

#[bon]
Expand Down
Loading

0 comments on commit fed308f

Please sign in to comment.