Loading [MathJax]/extensions/TeX/AMSmath.js
Radium Engine
1.5.29
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
f
g
i
l
m
n
o
p
q
r
s
t
u
v
z
Functions
a
c
d
f
g
i
l
m
n
o
p
q
r
s
t
u
v
Variables
Typedefs
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
Variables
b
d
f
i
m
s
v
w
Typedefs
a
b
c
f
g
i
k
n
o
r
s
t
u
v
Enumerations
Enumerator
Related Symbols
Files
File List
File Members
All
Macros
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
mapiterators.cpp
1
#include <
Core/Utils/StdMapIterators.hpp
>
2
#include <catch2/catch_test_macros.hpp>
3
4
#include <string>
5
#include <utility>
6
7
TEST_CASE(
"Core/Utils/StdMapIterators"
,
"[unittests][Core][Core/Utils][StdMapIterators]"
) {
8
std::map<int, std::string>
myMap { { 2,
"2"
}, { 3,
"3"
} };
9
11
for
(
const
auto
& k :
Ra::Core::Utils::map_keys
( myMap ) )
12
REQUIRE( k ==
std::stoi
( myMap[k] ) );
14
16
for
(
auto
& v :
Ra::Core::Utils::map_values
( myMap ) )
17
v =
std::string
(
"-"
) + v;
19
20
for
(
const
auto
& k :
Ra::Core::Utils::map_keys
( myMap ) )
21
REQUIRE( k == -
std::stoi
( myMap[k] ) );
22
}
StdMapIterators.hpp
std::string
std::map
std::stoi
T stoi(T... args)
Ra::Core::Utils::map_keys
Generate a range to iterate over the keys of a map.
Definition
StdMapIterators.hpp:22
Ra::Core::Utils::map_values
Generate a range to iterate over the values of a map.
Definition
StdMapIterators.hpp:69
tests
unittest
Core
mapiterators.cpp
Generated by
1.12.0