test/hotspot/gtest/logging/test_logSelectionList.cpp
author rehn
Fri, 29 Nov 2019 12:09:25 +0100
changeset 59325 3636bab5e81e
parent 49067 c153e9daadce
permissions -rw-r--r--
8234086: VM operation can be simplified Reviewed-by: kbarrett, dholmes, dcubed
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
40656
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
     1
/*
49016
ea85eed8b012 8196783: Refactor LogTagLevelExpression into separate classes
mlarsson
parents: 47765
diff changeset
     2
 * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
40656
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
     4
 *
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
     7
 * published by the Free Software Foundation.
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
     8
 *
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    13
 * accompanied this code).
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    14
 *
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    18
 *
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    21
 * questions.
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    22
 */
41705
332239c052cc 8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents: 41676
diff changeset
    23
40656
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    24
#include "precompiled.hpp"
47765
b7c7428eaab9 8189610: Reconcile jvm.h and all jvm_md.h between java.base and hotspot
coleenp
parents: 47216
diff changeset
    25
#include "jvm.h"
40656
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    26
#include "logging/logLevel.hpp"
49016
ea85eed8b012 8196783: Refactor LogTagLevelExpression into separate classes
mlarsson
parents: 47765
diff changeset
    27
#include "logging/logSelectionList.hpp"
40656
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    28
#include "logging/logTagSet.hpp"
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    29
#include "utilities/globalDefinitions.hpp"
49016
ea85eed8b012 8196783: Refactor LogTagLevelExpression into separate classes
mlarsson
parents: 47765
diff changeset
    30
#include "logTestUtils.inline.hpp"
ea85eed8b012 8196783: Refactor LogTagLevelExpression into separate classes
mlarsson
parents: 47765
diff changeset
    31
#include "unittest.hpp"
40656
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    32
49016
ea85eed8b012 8196783: Refactor LogTagLevelExpression into separate classes
mlarsson
parents: 47765
diff changeset
    33
TEST(LogSelectionList, combination_limit) {
ea85eed8b012 8196783: Refactor LogTagLevelExpression into separate classes
mlarsson
parents: 47765
diff changeset
    34
  size_t max_combinations = LogSelectionList::MaxSelections;
41676
45778d817919 8165698: Convert LogTagSet related internal tests to GTest
mlarsson
parents: 40913
diff changeset
    35
  EXPECT_GT(max_combinations, LogTagSet::ntagsets())
45778d817919 8165698: Convert LogTagSet related internal tests to GTest
mlarsson
parents: 40913
diff changeset
    36
      << "Combination limit not sufficient for configuring all available tag sets";
45778d817919 8165698: Convert LogTagSet related internal tests to GTest
mlarsson
parents: 40913
diff changeset
    37
}
45778d817919 8165698: Convert LogTagSet related internal tests to GTest
mlarsson
parents: 40913
diff changeset
    38
49016
ea85eed8b012 8196783: Refactor LogTagLevelExpression into separate classes
mlarsson
parents: 47765
diff changeset
    39
TEST(LogSelectionList, parse) {
40656
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    40
  char buf[256];
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    41
  const char* valid_expression[] = {
49016
ea85eed8b012 8196783: Refactor LogTagLevelExpression into separate classes
mlarsson
parents: 47765
diff changeset
    42
    "logging=off,all", "gc,logging", "logging+gc", "logging+gc,gc", "gc=trace,logging=info",
ea85eed8b012 8196783: Refactor LogTagLevelExpression into separate classes
mlarsson
parents: 47765
diff changeset
    43
    "logging+gc=trace,gc+logging=warning,logging", "gc,all=info"
40656
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    44
  };
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    45
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    46
  // Verify valid expressions parse without problems
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    47
  for (size_t i = 0; i < ARRAY_SIZE(valid_expression); i++) {
49016
ea85eed8b012 8196783: Refactor LogTagLevelExpression into separate classes
mlarsson
parents: 47765
diff changeset
    48
    LogSelectionList expr;
40656
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    49
    EXPECT_TRUE(expr.parse(valid_expression[i])) << "Valid expression '" << valid_expression[i] << "' did not parse";
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    50
  }
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    51
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    52
  // Verify invalid expressions do not parse
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    53
  for (size_t i = 0; i < ARRAY_SIZE(valid_expression); i++) {
49016
ea85eed8b012 8196783: Refactor LogTagLevelExpression into separate classes
mlarsson
parents: 47765
diff changeset
    54
    for (size_t j = 0; j < ARRAY_SIZE(invalid_selection_substr); j++) {
40656
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    55
      // Prefix with invalid substr
49016
ea85eed8b012 8196783: Refactor LogTagLevelExpression into separate classes
mlarsson
parents: 47765
diff changeset
    56
      LogSelectionList expr;
ea85eed8b012 8196783: Refactor LogTagLevelExpression into separate classes
mlarsson
parents: 47765
diff changeset
    57
      jio_snprintf(buf, sizeof(buf), "%s%s", invalid_selection_substr[j], valid_expression[i]);
40656
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    58
      EXPECT_FALSE(expr.parse(buf)) << "'" << buf << "'" << " considered legal";
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    59
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    60
      // Suffix with invalid substr
49016
ea85eed8b012 8196783: Refactor LogTagLevelExpression into separate classes
mlarsson
parents: 47765
diff changeset
    61
      LogSelectionList expr1;
ea85eed8b012 8196783: Refactor LogTagLevelExpression into separate classes
mlarsson
parents: 47765
diff changeset
    62
      jio_snprintf(buf, sizeof(buf), "%s%s", valid_expression[i], invalid_selection_substr[j]);
40656
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    63
      EXPECT_FALSE(expr1.parse(buf)) << "'" << buf << "'" << " considered legal";
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    64
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    65
      // Use only the invalid substr
49016
ea85eed8b012 8196783: Refactor LogTagLevelExpression into separate classes
mlarsson
parents: 47765
diff changeset
    66
      LogSelectionList expr2;
ea85eed8b012 8196783: Refactor LogTagLevelExpression into separate classes
mlarsson
parents: 47765
diff changeset
    67
      EXPECT_FALSE(expr2.parse(invalid_selection_substr[j])) << "'" << invalid_selection_substr[j] << "'" << " considered legal";
40656
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    68
    }
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    69
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    70
    // Suffix/prefix with some unique invalid prefixes/suffixes
49016
ea85eed8b012 8196783: Refactor LogTagLevelExpression into separate classes
mlarsson
parents: 47765
diff changeset
    71
    LogSelectionList expr;
40656
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    72
    jio_snprintf(buf, sizeof(buf), "*%s", valid_expression[i]);
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    73
    EXPECT_FALSE(expr.parse(buf)) << "'" << buf << "'" << " considered legal";
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    74
49016
ea85eed8b012 8196783: Refactor LogTagLevelExpression into separate classes
mlarsson
parents: 47765
diff changeset
    75
    LogSelectionList expr1;
40656
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    76
    jio_snprintf(buf, sizeof(buf), "logging*%s", valid_expression[i]);
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    77
    EXPECT_FALSE(expr1.parse(buf)) << "'" << buf << "'" << " considered legal";
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    78
  }
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    79
}
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    80
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    81
// Test the level_for() function for an empty expression
49016
ea85eed8b012 8196783: Refactor LogTagLevelExpression into separate classes
mlarsson
parents: 47765
diff changeset
    82
TEST(LogSelectionList, level_for_empty) {
ea85eed8b012 8196783: Refactor LogTagLevelExpression into separate classes
mlarsson
parents: 47765
diff changeset
    83
  LogSelectionList emptyexpr;
40656
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    84
  ASSERT_TRUE(emptyexpr.parse(""));
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    85
  // All tagsets should be unspecified since the expression doesn't involve any tagset
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    86
  for (LogTagSet* ts = LogTagSet::first(); ts != NULL; ts = ts->next()) {
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    87
    EXPECT_EQ(LogLevel::Unspecified, emptyexpr.level_for(*ts));
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    88
  }
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    89
}
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    90
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    91
// Test level_for() with an expression that has overlap (last subexpression should be used)
49016
ea85eed8b012 8196783: Refactor LogTagLevelExpression into separate classes
mlarsson
parents: 47765
diff changeset
    92
TEST(LogSelectionList, level_for_overlap) {
ea85eed8b012 8196783: Refactor LogTagLevelExpression into separate classes
mlarsson
parents: 47765
diff changeset
    93
  LogSelectionList overlapexpr;
40656
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    94
  // The all=warning will be overridden with gc=info and/or logging+safepoint*=trace
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    95
  ASSERT_TRUE(overlapexpr.parse("all=warning,gc=info,logging+safepoint*=trace"));
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    96
  for (LogTagSet* ts = LogTagSet::first(); ts != NULL; ts = ts->next()) {
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    97
    if (ts->contains(PREFIX_LOG_TAG(gc)) && ts->ntags() == 1) {
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    98
      EXPECT_EQ(LogLevel::Info, overlapexpr.level_for(*ts));
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
    99
    } else if (ts->contains(PREFIX_LOG_TAG(logging)) && ts->contains(PREFIX_LOG_TAG(safepoint))) {
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
   100
      EXPECT_EQ(LogLevel::Trace, overlapexpr.level_for(*ts));
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
   101
    } else {
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
   102
      EXPECT_EQ(LogLevel::Warning, overlapexpr.level_for(*ts));
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
   103
    }
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
   104
  }
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
   105
  EXPECT_EQ(LogLevel::Warning, overlapexpr.level_for(LogTagSetMapping<LOG_TAGS(class)>::tagset()));
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
   106
  EXPECT_EQ(LogLevel::Info, overlapexpr.level_for(LogTagSetMapping<LOG_TAGS(gc)>::tagset()));
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
   107
  EXPECT_EQ(LogLevel::Trace, overlapexpr.level_for(LogTagSetMapping<LOG_TAGS(logging, safepoint)>::tagset()));
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
   108
  EXPECT_EQ(LogLevel::Trace,
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
   109
            overlapexpr.level_for(LogTagSetMapping<LOG_TAGS(logging, gc, class, safepoint, heap)>::tagset()));
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
   110
}
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
   111
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
   112
// Test level_for() with an expression containing two independent subexpressions
49016
ea85eed8b012 8196783: Refactor LogTagLevelExpression into separate classes
mlarsson
parents: 47765
diff changeset
   113
TEST(LogSelectionList, level_for_disjoint) {
ea85eed8b012 8196783: Refactor LogTagLevelExpression into separate classes
mlarsson
parents: 47765
diff changeset
   114
  LogSelectionList reducedexpr;
40656
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
   115
  ASSERT_TRUE(reducedexpr.parse("gc+logging=trace,class*=error"));
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
   116
  EXPECT_EQ(LogLevel::Error, reducedexpr.level_for(LogTagSetMapping<LOG_TAGS(class)>::tagset()));
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
   117
  EXPECT_EQ(LogLevel::Error, reducedexpr.level_for(LogTagSetMapping<LOG_TAGS(safepoint, class)>::tagset()));
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
   118
  EXPECT_EQ(LogLevel::NotMentioned, reducedexpr.level_for(LogTagSetMapping<LOG_TAGS(safepoint)>::tagset()));
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
   119
  EXPECT_EQ(LogLevel::NotMentioned, reducedexpr.level_for(LogTagSetMapping<LOG_TAGS(logging)>::tagset()));
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
   120
  EXPECT_EQ(LogLevel::NotMentioned, reducedexpr.level_for(LogTagSetMapping<LOG_TAGS(gc)>::tagset()));
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
   121
  EXPECT_EQ(LogLevel::Trace, reducedexpr.level_for(LogTagSetMapping<LOG_TAGS(logging, gc)>::tagset()));
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
   122
}
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
   123
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
   124
// Test level_for() with an expression that is completely overridden in the last part of the expression
49016
ea85eed8b012 8196783: Refactor LogTagLevelExpression into separate classes
mlarsson
parents: 47765
diff changeset
   125
TEST(LogSelectionList, level_for_override) {
ea85eed8b012 8196783: Refactor LogTagLevelExpression into separate classes
mlarsson
parents: 47765
diff changeset
   126
  LogSelectionList overrideexpr;
40656
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
   127
  // No matter what, everything should be set to error level because of the last part
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
   128
  ASSERT_TRUE(overrideexpr.parse("logging,gc*=trace,all=error"));
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
   129
  EXPECT_EQ(LogLevel::Error, overrideexpr.level_for(LogTagSetMapping<LOG_TAGS(class)>::tagset()));
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
   130
  EXPECT_EQ(LogLevel::Error, overrideexpr.level_for(LogTagSetMapping<LOG_TAGS(logging)>::tagset()));
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
   131
  EXPECT_EQ(LogLevel::Error, overrideexpr.level_for(LogTagSetMapping<LOG_TAGS(gc)>::tagset()));
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
   132
  EXPECT_EQ(LogLevel::Error, overrideexpr.level_for(LogTagSetMapping<LOG_TAGS(logging, gc)>::tagset()));
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
   133
}
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
   134
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
   135
// Test level_for() with a mixed expression with a bit of everything
49016
ea85eed8b012 8196783: Refactor LogTagLevelExpression into separate classes
mlarsson
parents: 47765
diff changeset
   136
TEST(LogSelectionList, level_for_mixed) {
ea85eed8b012 8196783: Refactor LogTagLevelExpression into separate classes
mlarsson
parents: 47765
diff changeset
   137
  LogSelectionList mixedexpr;
40656
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
   138
  ASSERT_TRUE(mixedexpr.parse("all=warning,gc*=debug,gc=trace,safepoint*=off"));
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
   139
  EXPECT_EQ(LogLevel::Warning, mixedexpr.level_for(LogTagSetMapping<LOG_TAGS(logging)>::tagset()));
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
   140
  EXPECT_EQ(LogLevel::Warning, mixedexpr.level_for(LogTagSetMapping<LOG_TAGS(logging, class)>::tagset()));
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
   141
  EXPECT_EQ(LogLevel::Debug, mixedexpr.level_for(LogTagSetMapping<LOG_TAGS(gc, class)>::tagset()));
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
   142
  EXPECT_EQ(LogLevel::Off, mixedexpr.level_for(LogTagSetMapping<LOG_TAGS(gc, safepoint, logging)>::tagset()));
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
   143
  EXPECT_EQ(LogLevel::Off, mixedexpr.level_for(LogTagSetMapping<LOG_TAGS(safepoint)>::tagset()));
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
   144
  EXPECT_EQ(LogLevel::Debug, mixedexpr.level_for(LogTagSetMapping<LOG_TAGS(logging, gc)>::tagset()));
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
   145
  EXPECT_EQ(LogLevel::Trace, mixedexpr.level_for(LogTagSetMapping<LOG_TAGS(gc)>::tagset()));
d4964c292b78 8061219: Implement unit-tests for UL
mlarsson
parents:
diff changeset
   146
}