Created
September 12, 2023 17:17
-
-
Save cmathew/f48da5fc9b03649c6f93b7da33390b5f to your computer and use it in GitHub Desktop.
Unit test which specifies sample source code and which Android Lint issues(s) we’d like to run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lint() | |
.files( | |
kotlin( | |
""" | |
package com.wealthfront.lint.test | |
import java.math.BigDecimal | |
class MyComparisonTester { | |
val comparisonExpression = BigDecimal.ONE == BigDecimal.ZERO | |
fun comparisonMethod(): Boolean { | |
return BigDecimal.ONE != BigDecimal.ZERO | |
} | |
} | |
""", | |
).indented(), | |
) | |
.issues(FORBID_EQUALS_FOR_BIGDECIMALS) | |
.run() | |
.expect(“...”) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment