From 13fbad00e070b57f616727b2ae35bfc81674dbe3 Mon Sep 17 00:00:00 2001 From: varkart <44122128+varkart@users.noreply.github.com> Date: Thu, 17 Feb 2022 13:05:09 -0500 Subject: [fixes #2990, #3069] flogger logger enum test cases --- .../resource/after-delombok/LoggerFlogger.java | 12 +++++++++++ .../resource/after-ecj/LoggerFlogger.java | 23 ++++++++++++++++++++++ test/transform/resource/before/LoggerFlogger.java | 12 +++++++++++ 3 files changed, 47 insertions(+) (limited to 'test') diff --git a/test/transform/resource/after-delombok/LoggerFlogger.java b/test/transform/resource/after-delombok/LoggerFlogger.java index 41d49fe4..0fe8083a 100644 --- a/test/transform/resource/after-delombok/LoggerFlogger.java +++ b/test/transform/resource/after-delombok/LoggerFlogger.java @@ -12,3 +12,15 @@ class LoggerFloggerOuter { private static final com.google.common.flogger.FluentLogger log = com.google.common.flogger.FluentLogger.forEnclosingClass(); } } +enum LoggerFloggerWithEnum { + CONSTANT; + @java.lang.SuppressWarnings("all") + private static final com.google.common.flogger.FluentLogger log = com.google.common.flogger.FluentLogger.forEnclosingClass(); +} +class LoggerFloggerWithInnerEnum { + enum Inner { + CONSTANT; + @java.lang.SuppressWarnings("all") + private static final com.google.common.flogger.FluentLogger log = com.google.common.flogger.FluentLogger.forEnclosingClass(); + } +} diff --git a/test/transform/resource/after-ecj/LoggerFlogger.java b/test/transform/resource/after-ecj/LoggerFlogger.java index d0526eee..b97082ff 100644 --- a/test/transform/resource/after-ecj/LoggerFlogger.java +++ b/test/transform/resource/after-ecj/LoggerFlogger.java @@ -28,3 +28,26 @@ class LoggerFloggerOuter { super(); } } +@Flogger enum LoggerFloggerWithEnum { + CONSTANT(), + private static final com.google.common.flogger.FluentLogger log = com.google.common.flogger.FluentLogger.forEnclosingClass(); + () { + } + LoggerFloggerWithEnum() { + super(); + } +} +class LoggerFloggerWithInnerEnum { + @Flogger enum Inner { + CONSTANT(), + private static final com.google.common.flogger.FluentLogger log = com.google.common.flogger.FluentLogger.forEnclosingClass(); + () { + } + Inner() { + super(); + } + } + LoggerFloggerWithInnerEnum() { + super(); + } +} diff --git a/test/transform/resource/before/LoggerFlogger.java b/test/transform/resource/before/LoggerFlogger.java index b143aae9..ff0249c7 100644 --- a/test/transform/resource/before/LoggerFlogger.java +++ b/test/transform/resource/before/LoggerFlogger.java @@ -14,3 +14,15 @@ class LoggerFloggerOuter { } } + +@Flogger +enum LoggerFloggerWithEnum { + CONSTANT; +} + +class LoggerFloggerWithInnerEnum { + @Flogger + enum Inner { + CONSTANT; + } +} \ No newline at end of file -- cgit