-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
bugSomething isn't workingSomething isn't working
Description
This code is too simple.
selfie/selfie-lib/src/commonMain/kotlin/com/diffplug/selfie/guts/CommentTracker.kt
Lines 51 to 54 in 6c3d0ee
| // TODO: there is a bug here due to string constants, and non-C file comments | |
| val newComment = | |
| if (str.contains("//selfieonce") || str.contains("// selfieonce")) { | |
| WritableComment.ONCE |
selfie/selfie-lib/src/commonMain/kotlin/com/diffplug/selfie/guts/SourceFile.kt
Lines 83 to 87 in 6c3d0ee
| fun removeSelfieOnceComments() { | |
| // TODO: there is a bug here due to string constants, and non-C file comments | |
| contentSlice = | |
| Slice(contentSlice.toString().replace("//selfieonce", "").replace("// selfieonce", "")) | |
| } |
For example:
class Test {
@Test public void example() {
expectSelfie("underTest").toBe("""
This is a string constant
// selfieonce
The comment above is not really a comment.
We effectively have a "forbidden value" that can't be inside inline snapshots.
""")
}
}Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working