<commit_before>#include "catch.hpp"

#include <shadow.hpp>


REGISTER_TYPE_BEGIN()
REGISTER_TYPE_END()

SHADOW_INIT()


TEST_CASE("test special member functions of shadow::variable", "[variable]")
{
    shadow::variable a;

    REQUIRE(a.has_value() == false);
}<commit_msg>Add unit tests for default constructing shadow::variable. 	modified:   tests/test_variable_api.cpp<commit_after>#include "catch.hpp"

#include <shadow.hpp>
#include <utility>


namespace tv_space
{
REGISTER_TYPE_BEGIN()
REGISTER_TYPE_END()

SHADOW_INIT()
}


TEST_CASE("default construct a variable", "[variable]")
{
    shadow::variable a;

    REQUIRE(a.has_value() == false);

    SECTION("copy construct another variable from a")
    {
        shadow::variable b = a;

        REQUIRE(b.has_value() == false);
    }

    SECTION("move construct another variable from a")
    {
        shadow::variable b = std::move(a);
    }

    SECTION("default constructo another variable")
    {
        shadow::variable b;

        SECTION("copy assign a to b")
        {
            b = a;

            REQUIRE(b.has_value() == false);
        }

        SECTION("move assign a to b")
        {
            b = std::move(a);

            REQUIRE(b.has_value() == false);
        }
    }
}
{'fraction_non_alphanumeric': 0.1337579617834395, 'fraction_numerical': 0.0, 'mean_word_length': 2.797583081570997, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '214020', 'n_tokens_mistral': 425, 'n_tokens_neox': 399, 'n_words': 90}