Skip to content

Commit

Permalink
groot/{rcmd,riofs}: add tests for more STL containers
Browse files Browse the repository at this point in the history
  • Loading branch information
sbinet committed Feb 16, 2022
1 parent f1aa905 commit 551dabd
Show file tree
Hide file tree
Showing 5 changed files with 473 additions and 0 deletions.
5 changes: 5 additions & 0 deletions groot/rcmd/dump_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,11 @@ func TestDump(t *testing.T) {
name: "../testdata/std-map-split1.root",
want: loadRef("testdata/std-map-split1.root.txt"),
},
{
// std::map, std::set, std::list, std::deque, std::unordered_map, std::unordered_set, TString
name: "../testdata/std-containers-split00.root",
want: loadRef("testdata/std-containers-split00.root.txt"),
},
{
// n-dim arrays
// FIXME(sbinet): arrays of Float16_t and Double32_t are flatten.
Expand Down
81 changes: 81 additions & 0 deletions groot/rcmd/testdata/std-containers-split00.root.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
key[000]: tree;1 "my tree title" (TTree)
[000][str]: one
[000][tstr]: one
[000][lst_i32]: [-1]
[000][deq_i32]: [-1]
[000][vec_i32]: [-1]
[000][vec_u32]: [1]
[000][vec_str]: [one]
[000][vec_tstr]: [one]
[000][vec_vec_i32]: [[-1]]
[000][vec_vec_u32]: [[1]]
[000][vec_vec_str]: [[one]]
[000][vec_vec_tstr]: [[one]]
[000][vec_set_i32]: [[-1]]
[000][vec_set_u32]: [[1]]
[000][vec_set_str]: [[one]]
[000][vec_set_tstr]: [[one]]
[000][set_i32]: [-1]
[000][set_u32]: [1]
[000][set_str]: [one]
[000][set_tstr]: [one]
[000][uset_str]: [one]
[000][map_i32_i16]: map[-1:-1]
[000][map_u32_u16]: map[1:1]
[000][map_i32_vec_i16]: map[-1:[-1]]
[000][map_u32_vec_u16]: map[1:[1]]
[000][map_i32_vec_str]: map[-1:[one]]
[000][map_i32_set_i16]: map[-1:[-1]]
[000][map_i32_set_str]: map[-1:[one]]
[000][map_str_i16]: map[one:-1]
[000][map_str_vec_i16]: map[one:[-1]]
[000][map_str_vec_str]: map[one:[one]]
[000][map_str_set_i16]: map[one:[-1]]
[000][map_str_set_str]: map[one:[one]]
[000][map_i32_vec_vec_i16]: map[-1:[[-1]]]
[000][map_i32_vec_set_i16]: map[-1:[[-1]]]
[000][map_str_str]: map[one:ONE]
[000][map_str_tstr]: map[one:ONE]
[000][map_tstr_tstr]: map[one:ONE]
[000][map_tstr_str]: map[one:ONE]
[000][umap_str_str]: map[one:ONE]
[001][str]: two
[001][tstr]: two
[001][lst_i32]: [-1 -2]
[001][deq_i32]: [-1 -2]
[001][vec_i32]: [-1 -2]
[001][vec_u32]: [1 2]
[001][vec_str]: [one two]
[001][vec_tstr]: [one two]
[001][vec_vec_i32]: [[-1] [-1 -2]]
[001][vec_vec_u32]: [[1] [1 2]]
[001][vec_vec_str]: [[one] [one two]]
[001][vec_vec_tstr]: [[one] [one two]]
[001][vec_set_i32]: [[-1] [-2 -1]]
[001][vec_set_u32]: [[1] [1 2]]
[001][vec_set_str]: [[one] [one two]]
[001][vec_set_tstr]: [[one] [one two]]
[001][set_i32]: [-2 -1]
[001][set_u32]: [1 2]
[001][set_str]: [one two]
[001][set_tstr]: [one two]
[001][uset_str]: [two one]
[001][map_i32_i16]: map[-2:-2 -1:-1]
[001][map_u32_u16]: map[1:1 2:2]
[001][map_i32_vec_i16]: map[-2:[-1 -2] -1:[-1]]
[001][map_u32_vec_u16]: map[1:[1] 2:[1 2]]
[001][map_i32_vec_str]: map[-2:[one two] -1:[one]]
[001][map_i32_set_i16]: map[-2:[-2 -1] -1:[-1]]
[001][map_i32_set_str]: map[-2:[one two] -1:[one]]
[001][map_str_i16]: map[one:-1 two:-2]
[001][map_str_vec_i16]: map[one:[-1] two:[-1 -2]]
[001][map_str_vec_str]: map[one:[one] two:[one two]]
[001][map_str_set_i16]: map[one:[-1] two:[-2 -1]]
[001][map_str_set_str]: map[one:[one] two:[one two]]
[001][map_i32_vec_vec_i16]: map[-2:[[-1] [-1 -2]] -1:[[-1]]]
[001][map_i32_vec_set_i16]: map[-2:[[-1] [-2 -1]] -1:[[-1]]]
[001][map_str_str]: map[one:ONE two:TWO]
[001][map_str_tstr]: map[one:ONE two:TWO]
[001][map_tstr_tstr]: map[one:ONE two:TWO]
[001][map_tstr_str]: map[one:ONE two:TWO]
[001][umap_str_str]: map[one:ONE two:TWO]
Loading

0 comments on commit 551dabd

Please sign in to comment.