You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: tests.rs
    path of file: ./repos/Rocket/examples/forms/src
    
    the code of the file until where you have to start completion: use std::fmt;
use super::{rocket, FormInput, FormOption};

use rocket::local::blocking::Client;
use rocket::http::ContentType;

impl fmt::Display for FormOption {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        match *self {
            FormOption::A => write!(f, "a"),
            FormOption::B => write!(f, "b"),
            FormOption::C => write!(f, "c"),
        }
    }
}

macro_rules! assert_form_eq {
    ($client:expr, $form_str:expr, $expected:expr) => {{
        let res = $client.post("/")
            .header(ContentType::Form)
            .body($form_str)
            .dispatch();

        assert_eq!(res.into_string(), Some($expected));
    }};
}

macro_rules! assert_valid_form {
    ($client:expr, $input:expr) => {{
        let f = format!("checkbox={}&number={}&type={}&password={}&textarea={}&select={}",
                $input.checkbox, $input.number, $input.radio, $input.password,
                $input.text_area, $input.select);
        assert_form_eq!($client, &f, format!("{:?}", $input));
    }};
}

macro_rules! assert_valid_raw_form {
    ($client:expr, $form_str:expr, $input:expr) => {{
        assert_form_eq!($client, $form_str, format!("{:?}", $input));
    }};
}

#[test]
fn test_good_forms() {
    let client = Client::tracked(rocket()).unwrap();
    let mut input = FormInput {
        checkbox: true,
        number: 3
    
fn check_semantically_invalid_forms() {
    let client = Client::tracked(rocket()).unwrap();
    let mut form_vals = ["true", "1", "a", "hi", "hey", "b"];

    form_vals[0] = "not true";
    assert_invalid_form!(&client, &mut form_vals);
    form_vals[0] = "bing";
    assert_invalid_form!(&client, &mut form_vals);
    form_vals[0] = "true0";
    assert_invalid_form!(&client, &mut form_vals);
    form_vals[0] = " false";
    assert_invalid_form!(&client, &mut form_vals);

    form_vals[1] = "-1";
    assert_invalid_form!(&client, &mut form_vals);
    form_vals[1] = "1e10";
    assert_invalid_form!(&client, &mut form_vals);
    form_vals[1] = "-1-1";
    assert_invalid_form!(&client, &mut form_vals);
    form_vals[1] = "NaN";
    assert_invalid_form!(&client, &mut form_vals);

    form_vals[2] = "A?";
    assert_invalid_form!(&client, &mut form_vals);
    form_vals[2] = " B";
    assert_invalid_form!(&client, &mut form_vals);
    form_vals[2] = "d";
    assert_invalid_form!(&client, &mut form_vals);
    form_vals[2] = "100";
    assert_invalid_form!(&client, &mut form_vals);
    form_vals[2] = "";
    assert_invalid_form!(&client, &mut form_vals);

    // password and textarea are always valid, so we skip them
    form_vals[5] = "A.";
    assert_invalid_form!(&client, &mut form_vals);
    form_vals[5] = "b ";
    assert_invalid_form!(&client, &mut form_vals);
    form_vals[5] = "d";
    assert_invalid_form!(&client, &mut form_vals);
    form_vals[5] = "-a";
    assert_invalid_form!(&client, &mut form_vals);
    form_vals[5] = "";
    assert_invalid_form!(&client, &mut form_vals);

    // now forms with missing fields
    assert_invalid_raw_form!(&client, "number=10&type=a&password=hi&textarea=hey");
    assert_invalid_raw_form!(&client, "number=10&radio=a&password=hi&textarea=hey&select=b");
    assert_invalid_raw_form!(&client, "number=10&password=hi&select=b");
    assert_invalid_raw_form!(&client, "number=10&select=b");
    assert_invalid_raw_form!(&client, "password=hi&select=b");
    assert_invalid_raw_form!(&client, "password=hi");
    assert_invalid_raw_form!(&client, "");
}