example style fixes

This commit is contained in:
BlackMATov
2022-02-13 07:34:33 +07:00
parent 4072c525ca
commit 1a87937719
9 changed files with 17 additions and 42 deletions

View File

@@ -49,7 +49,12 @@ target_link_libraries(your_project_target meta.hpp)
## Examples
> coming soon
- [Class](./manuals/meta_examples/class_example.cpp)
- [Enum](./manuals/meta_examples/enum_example.cpp)
- [Function](./manuals/meta_examples/function_example.cpp)
- [Member](./manuals/meta_examples/member_example.cpp)
- [Method](./manuals/meta_examples/method_example.cpp)
- [Variable](./manuals/meta_examples/variable_example.cpp)
## API

View File

@@ -40,7 +40,7 @@ namespace
};
}
TEST_CASE("meta/meta_examples/classes/type") {
TEST_CASE("meta/meta_examples/class/type") {
namespace meta = meta_hpp;
// 'shape' class type registration
@@ -64,7 +64,7 @@ TEST_CASE("meta/meta_examples/classes/type") {
}
}
TEST_CASE("meta/meta_examples/classes/usage") {
TEST_CASE("meta/meta_examples/class/usage") {
namespace meta = meta_hpp;
// resolves a class type by static class type

View File

@@ -15,7 +15,7 @@ namespace
};
}
TEST_CASE("meta/meta_examples/enums/type") {
TEST_CASE("meta/meta_examples/enum/type") {
namespace meta = meta_hpp;
// 'align' enumeration type registration
@@ -40,7 +40,7 @@ TEST_CASE("meta/meta_examples/enums/type") {
}
}
TEST_CASE("meta/meta_examples/enums/usage") {
TEST_CASE("meta/meta_examples/enum/usage") {
namespace meta = meta_hpp;
const align e = align::center;

View File

@@ -17,7 +17,7 @@ namespace
}
}
TEST_CASE("meta/meta_examples/functions/type") {
TEST_CASE("meta/meta_examples/function/type") {
namespace meta = meta_hpp;
// resolves a function type by pointer
@@ -37,7 +37,7 @@ TEST_CASE("meta/meta_examples/functions/type") {
CHECK(add_function_type.get_argument_type(1) == meta::resolve_type<int>());
}
TEST_CASE("meta/meta_examples/functions/usage") {
TEST_CASE("meta/meta_examples/function/usage") {
namespace meta = meta_hpp;
// 'math' local scope declaration

View File

@@ -14,7 +14,7 @@ namespace
};
}
TEST_CASE("meta/meta_examples/members/type") {
TEST_CASE("meta/meta_examples/member/type") {
namespace meta = meta_hpp;
// 'ivec2' class type registration
@@ -35,7 +35,7 @@ TEST_CASE("meta/meta_examples/members/type") {
CHECK(x_member_type.get_value_type() == meta::resolve_type<int>());
}
TEST_CASE("meta/meta_examples/members/usage") {
TEST_CASE("meta/meta_examples/member/usage") {
namespace meta = meta_hpp;
ivec2 v{42, 21};

View File

@@ -24,7 +24,7 @@ namespace
};
}
TEST_CASE("meta/meta_examples/methods/type") {
TEST_CASE("meta/meta_examples/method/type") {
namespace meta = meta_hpp;
// 'ivec2' class type registration
@@ -50,7 +50,7 @@ TEST_CASE("meta/meta_examples/methods/type") {
CHECK(add_method_type.get_argument_type(0) == meta::resolve_type<const ivec2&>());
}
TEST_CASE("meta/meta_examples/methods/usage") {
TEST_CASE("meta/meta_examples/method/usage") {
namespace meta = meta_hpp;
ivec2 v{20, 10};

View File

@@ -1,15 +0,0 @@
/*******************************************************************************
* This file is part of the "https://github.com/blackmatov/meta.hpp"
* For conditions of distribution and use, see copyright notice in LICENSE.md
* Copyright (C) 2021-2022, by Matvey Cherevko (blackmatov@gmail.com)
******************************************************************************/
#include "../meta_manuals.hpp"
namespace
{
}
TEST_CASE("meta/meta_examples/scopes") {
namespace meta = meta_hpp;
}

View File

@@ -1,15 +0,0 @@
/*******************************************************************************
* This file is part of the "https://github.com/blackmatov/meta.hpp"
* For conditions of distribution and use, see copyright notice in LICENSE.md
* Copyright (C) 2021-2022, by Matvey Cherevko (blackmatov@gmail.com)
******************************************************************************/
#include "../meta_manuals.hpp"
namespace
{
}
TEST_CASE("meta/meta_examples/values") {
namespace meta = meta_hpp;
}

View File

@@ -12,7 +12,7 @@ namespace
const double sqrt2_v{1.4142135624};
}
TEST_CASE("meta/meta_examples/variables/usage") {
TEST_CASE("meta/meta_examples/variable/usage") {
namespace meta = meta_hpp;
// 'constants' local scope declaration