Skip to content

Commit

Permalink
regenerate tests
Browse files Browse the repository at this point in the history
  • Loading branch information
senekor committed Aug 15, 2024
1 parent b29a7eb commit 015a79e
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 62 deletions.
10 changes: 5 additions & 5 deletions exercises/practice/knapsack/tests/knapsack.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use knapsack::*;

#[test]
fn test_no_items() {
fn no_items() {
let max_weight = 100;
let items = [];
let output = maximum_value(max_weight, &items);
Expand All @@ -11,7 +11,7 @@ fn test_no_items() {

#[test]
#[ignore]
fn test_one_item_too_heavy() {
fn one_item_too_heavy() {
let max_weight = 10;
let items = [Item {
weight: 100,
Expand All @@ -24,7 +24,7 @@ fn test_one_item_too_heavy() {

#[test]
#[ignore]
fn test_five_items_cannot_be_greedy_by_weight() {
fn five_items_cannot_be_greedy_by_weight() {
let max_weight = 10;
let items = [
Item {
Expand Down Expand Up @@ -55,7 +55,7 @@ fn test_five_items_cannot_be_greedy_by_weight() {

#[test]
#[ignore]
fn test_five_items_cannot_be_greedy_by_value() {
fn five_items_cannot_be_greedy_by_value() {
let max_weight = 10;
let items = [
Item {
Expand Down Expand Up @@ -86,7 +86,7 @@ fn test_five_items_cannot_be_greedy_by_value() {

#[test]
#[ignore]
fn test_example_knapsack() {
fn example_knapsack() {
let max_weight = 10;
let items = [
Item {
Expand Down
34 changes: 17 additions & 17 deletions exercises/practice/raindrops/tests/raindrops.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use raindrops::*;

#[test]
fn test_the_sound_for_1_is_1() {
fn the_sound_for_1_is_1() {
let input = 1;
let output = raindrops(input);
let expected = "1";
Expand All @@ -10,7 +10,7 @@ fn test_the_sound_for_1_is_1() {

#[test]
#[ignore]
fn test_the_sound_for_3_is_pling() {
fn the_sound_for_3_is_pling() {
let input = 3;
let output = raindrops(input);
let expected = "Pling";
Expand All @@ -19,7 +19,7 @@ fn test_the_sound_for_3_is_pling() {

#[test]
#[ignore]
fn test_the_sound_for_5_is_plang() {
fn the_sound_for_5_is_plang() {
let input = 5;
let output = raindrops(input);
let expected = "Plang";
Expand All @@ -28,7 +28,7 @@ fn test_the_sound_for_5_is_plang() {

#[test]
#[ignore]
fn test_the_sound_for_7_is_plong() {
fn the_sound_for_7_is_plong() {
let input = 7;
let output = raindrops(input);
let expected = "Plong";
Expand All @@ -37,7 +37,7 @@ fn test_the_sound_for_7_is_plong() {

#[test]
#[ignore]
fn test_the_sound_for_6_is_pling_as_it_has_a_factor_3() {
fn the_sound_for_6_is_pling_as_it_has_a_factor_3() {
let input = 6;
let output = raindrops(input);
let expected = "Pling";
Expand All @@ -55,7 +55,7 @@ fn test_2_to_the_power_3_does_not_make_a_raindrop_sound_as_3_is_the_exponent_not

#[test]
#[ignore]
fn test_the_sound_for_9_is_pling_as_it_has_a_factor_3() {
fn the_sound_for_9_is_pling_as_it_has_a_factor_3() {
let input = 9;
let output = raindrops(input);
let expected = "Pling";
Expand All @@ -64,7 +64,7 @@ fn test_the_sound_for_9_is_pling_as_it_has_a_factor_3() {

#[test]
#[ignore]
fn test_the_sound_for_10_is_plang_as_it_has_a_factor_5() {
fn the_sound_for_10_is_plang_as_it_has_a_factor_5() {
let input = 10;
let output = raindrops(input);
let expected = "Plang";
Expand All @@ -73,7 +73,7 @@ fn test_the_sound_for_10_is_plang_as_it_has_a_factor_5() {

#[test]
#[ignore]
fn test_the_sound_for_14_is_plong_as_it_has_a_factor_of_7() {
fn the_sound_for_14_is_plong_as_it_has_a_factor_of_7() {
let input = 14;
let output = raindrops(input);
let expected = "Plong";
Expand All @@ -82,7 +82,7 @@ fn test_the_sound_for_14_is_plong_as_it_has_a_factor_of_7() {

#[test]
#[ignore]
fn test_the_sound_for_15_is_plingplang_as_it_has_factors_3_and_5() {
fn the_sound_for_15_is_plingplang_as_it_has_factors_3_and_5() {
let input = 15;
let output = raindrops(input);
let expected = "PlingPlang";
Expand All @@ -91,7 +91,7 @@ fn test_the_sound_for_15_is_plingplang_as_it_has_factors_3_and_5() {

#[test]
#[ignore]
fn test_the_sound_for_21_is_plingplong_as_it_has_factors_3_and_7() {
fn the_sound_for_21_is_plingplong_as_it_has_factors_3_and_7() {
let input = 21;
let output = raindrops(input);
let expected = "PlingPlong";
Expand All @@ -100,7 +100,7 @@ fn test_the_sound_for_21_is_plingplong_as_it_has_factors_3_and_7() {

#[test]
#[ignore]
fn test_the_sound_for_25_is_plang_as_it_has_a_factor_5() {
fn the_sound_for_25_is_plang_as_it_has_a_factor_5() {
let input = 25;
let output = raindrops(input);
let expected = "Plang";
Expand All @@ -109,7 +109,7 @@ fn test_the_sound_for_25_is_plang_as_it_has_a_factor_5() {

#[test]
#[ignore]
fn test_the_sound_for_27_is_pling_as_it_has_a_factor_3() {
fn the_sound_for_27_is_pling_as_it_has_a_factor_3() {
let input = 27;
let output = raindrops(input);
let expected = "Pling";
Expand All @@ -118,7 +118,7 @@ fn test_the_sound_for_27_is_pling_as_it_has_a_factor_3() {

#[test]
#[ignore]
fn test_the_sound_for_35_is_plangplong_as_it_has_factors_5_and_7() {
fn the_sound_for_35_is_plangplong_as_it_has_factors_5_and_7() {
let input = 35;
let output = raindrops(input);
let expected = "PlangPlong";
Expand All @@ -127,7 +127,7 @@ fn test_the_sound_for_35_is_plangplong_as_it_has_factors_5_and_7() {

#[test]
#[ignore]
fn test_the_sound_for_49_is_plong_as_it_has_a_factor_7() {
fn the_sound_for_49_is_plong_as_it_has_a_factor_7() {
let input = 49;
let output = raindrops(input);
let expected = "Plong";
Expand All @@ -136,7 +136,7 @@ fn test_the_sound_for_49_is_plong_as_it_has_a_factor_7() {

#[test]
#[ignore]
fn test_the_sound_for_52_is_52() {
fn the_sound_for_52_is_52() {
let input = 52;
let output = raindrops(input);
let expected = "52";
Expand All @@ -145,7 +145,7 @@ fn test_the_sound_for_52_is_52() {

#[test]
#[ignore]
fn test_the_sound_for_105_is_plingplangplong_as_it_has_factors_3_5_and_7() {
fn the_sound_for_105_is_plingplangplong_as_it_has_factors_3_5_and_7() {
let input = 105;
let output = raindrops(input);
let expected = "PlingPlangPlong";
Expand All @@ -154,7 +154,7 @@ fn test_the_sound_for_105_is_plingplangplong_as_it_has_factors_3_5_and_7() {

#[test]
#[ignore]
fn test_the_sound_for_3125_is_plang_as_it_has_a_factor_5() {
fn the_sound_for_3125_is_plang_as_it_has_a_factor_5() {
let input = 3125;
let output = raindrops(input);
let expected = "Plang";
Expand Down
26 changes: 13 additions & 13 deletions exercises/practice/rectangles/tests/rectangles.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use rectangles::*;

#[test]
fn test_no_rows() {
fn no_rows() {
let input = &[];
let output = count(input);
let expected = 0;
Expand All @@ -10,7 +10,7 @@ fn test_no_rows() {

#[test]
#[ignore]
fn test_no_columns() {
fn no_columns() {
let input = &[""];
let output = count(input);
let expected = 0;
Expand All @@ -19,7 +19,7 @@ fn test_no_columns() {

#[test]
#[ignore]
fn test_no_rectangles() {
fn no_rectangles() {
let input = &[" "];
let output = count(input);
let expected = 0;
Expand All @@ -28,7 +28,7 @@ fn test_no_rectangles() {

#[test]
#[ignore]
fn test_one_rectangle() {
fn one_rectangle() {
#[rustfmt::skip]
let input = &[
"+-+",
Expand All @@ -42,7 +42,7 @@ fn test_one_rectangle() {

#[test]
#[ignore]
fn test_two_rectangles_without_shared_parts() {
fn two_rectangles_without_shared_parts() {
#[rustfmt::skip]
let input = &[
" +-+",
Expand All @@ -58,7 +58,7 @@ fn test_two_rectangles_without_shared_parts() {

#[test]
#[ignore]
fn test_five_rectangles_with_shared_parts() {
fn five_rectangles_with_shared_parts() {
#[rustfmt::skip]
let input = &[
" +-+",
Expand All @@ -74,7 +74,7 @@ fn test_five_rectangles_with_shared_parts() {

#[test]
#[ignore]
fn test_rectangle_of_height_1_is_counted() {
fn rectangle_of_height_1_is_counted() {
#[rustfmt::skip]
let input = &[
"+--+",
Expand All @@ -87,7 +87,7 @@ fn test_rectangle_of_height_1_is_counted() {

#[test]
#[ignore]
fn test_rectangle_of_width_1_is_counted() {
fn rectangle_of_width_1_is_counted() {
#[rustfmt::skip]
let input = &[
"++",
Expand All @@ -114,7 +114,7 @@ fn test_1x1_square_is_counted() {

#[test]
#[ignore]
fn test_only_complete_rectangles_are_counted() {
fn only_complete_rectangles_are_counted() {
#[rustfmt::skip]
let input = &[
" +-+",
Expand All @@ -130,7 +130,7 @@ fn test_only_complete_rectangles_are_counted() {

#[test]
#[ignore]
fn test_rectangles_can_be_of_different_sizes() {
fn rectangles_can_be_of_different_sizes() {
#[rustfmt::skip]
let input = &[
"+------+----+",
Expand All @@ -146,7 +146,7 @@ fn test_rectangles_can_be_of_different_sizes() {

#[test]
#[ignore]
fn test_corner_is_required_for_a_rectangle_to_be_complete() {
fn corner_is_required_for_a_rectangle_to_be_complete() {
#[rustfmt::skip]
let input = &[
"+------+----+",
Expand All @@ -162,7 +162,7 @@ fn test_corner_is_required_for_a_rectangle_to_be_complete() {

#[test]
#[ignore]
fn test_large_input_with_many_rectangles() {
fn large_input_with_many_rectangles() {
#[rustfmt::skip]
let input = &[
"+---+--+----+",
Expand All @@ -181,7 +181,7 @@ fn test_large_input_with_many_rectangles() {

#[test]
#[ignore]
fn test_rectangles_must_have_four_sides() {
fn rectangles_must_have_four_sides() {
#[rustfmt::skip]
let input = &[
"+-+ +-+",
Expand Down
Loading

0 comments on commit 015a79e

Please sign in to comment.