mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Reformat the world
This commit is contained in:
parent
194cb24547
commit
b2f171ec69
714 changed files with 35149 additions and 35203 deletions
|
@ -1,4 +1,5 @@
|
|||
#include "zeek/List.h"
|
||||
|
||||
#include "zeek/3rdparty/doctest.h"
|
||||
|
||||
TEST_CASE("list construction")
|
||||
|
@ -13,7 +14,7 @@ TEST_CASE("list construction")
|
|||
|
||||
TEST_CASE("list operation")
|
||||
{
|
||||
zeek::List<int> list({ 1, 2, 3 });
|
||||
zeek::List<int> list({1, 2, 3});
|
||||
CHECK(list.size() == 3);
|
||||
CHECK(list.max() == 3);
|
||||
CHECK(list[0] == 1);
|
||||
|
@ -85,14 +86,14 @@ TEST_CASE("list operation")
|
|||
|
||||
TEST_CASE("list iteration")
|
||||
{
|
||||
zeek::List<int> list({ 1, 2, 3, 4});
|
||||
zeek::List<int> list({1, 2, 3, 4});
|
||||
|
||||
int index = 1;
|
||||
for ( int v : list )
|
||||
CHECK(v == index++);
|
||||
|
||||
index = 1;
|
||||
for ( auto it = list.begin(); it != list.end(); index++, ++it)
|
||||
for ( auto it = list.begin(); it != list.end(); index++, ++it )
|
||||
CHECK(*it == index);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue