Skip to content

Unexpected tests for some inherited methods on enums #457

@sofurihafe

Description

@sofurihafe

Description

Generated tests for enum contain methods testing valueOf

To Reproduce

  1. Run Contest Estimator with method com.google.common.base.CaseFormat.* and 300s time limit.

Actual behavior

Generated tests contain the following:

 @Test //@org.junit.jupiter.api.DisplayName("valueOf: arg_0 = blank string -> throw IllegalArgumentException") public void testValueOfThrowsIAEWithBlankString() { /* This test fails because executable under testing com.google.common.base.CaseFormat.valueOf  produces Runtime exception java.lang.IllegalArgumentException: No enum constant com.google.common.base.CaseFormat. */ CaseFormat.valueOf(" "); } @Test //@org.junit.jupiter.api.DisplayName("valueOf: arg_0 has special characters -> throw IllegalArgumentException") public void testValueOfThrowsIAEWithBlankString1() { /* This test fails because executable under testing com.google.common.base.CaseFormat.valueOf  produces Runtime exception java.lang.IllegalArgumentException: No enum constant com.google.common.base.CaseFormat.   */ CaseFormat.valueOf("\n\t\r"); }

Metadata

Metadata

Assignees

Labels

comp-symbolic-engineIssue is related to the symbolic execution enginectg-bugIssue is a bug

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions