blob: efa9348201261d76ac676d36031f9ead4839b9ba [file] [log] [blame]
package com.airbnb.lottie.snapshots.tests
import com.airbnb.lottie.snapshots.SnapshotTestCase
import com.airbnb.lottie.snapshots.SnapshotTestCaseContext
import com.airbnb.lottie.snapshots.withDrawable
class MarkersTestCase : SnapshotTestCase {
override suspend fun SnapshotTestCaseContext.run() {
withDrawable("Tests/Marker.json", "Marker", "startFrame") { drawable ->
drawable.setMinAndMaxFrame("Marker A")
drawable.frame = drawable.minFrame.toInt()
}
withDrawable("Tests/Marker.json", "Marker", "endFrame") { drawable ->
drawable.setMinAndMaxFrame("Marker A")
drawable.frame = drawable.maxFrame.toInt()
}
withDrawable("Tests/RGBMarker.json", "Marker", "->[Green, Blue)") { drawable ->
drawable.setMinAndMaxFrame("Green Section", "Blue Section", false)
drawable.frame = drawable.minFrame.toInt()
}
withDrawable("Tests/RGBMarker.json", "Marker", "->[Green, Blue]") { drawable ->
drawable.setMinAndMaxFrame("Green Section", "Blue Section", true)
drawable.frame = drawable.minFrame.toInt()
}
withDrawable("Tests/RGBMarker.json", "Marker", "[Green, Blue)<-") { drawable ->
drawable.setMinAndMaxFrame("Green Section", "Blue Section", false)
drawable.frame = drawable.maxFrame.toInt()
}
withDrawable("Tests/RGBMarker.json", "Marker", "[Green, Blue]<-") { drawable ->
drawable.setMinAndMaxFrame("Green Section", "Blue Section", true)
drawable.frame = drawable.maxFrame.toInt()
}
}
}