1 Star 0 Fork 21

yh/Fyne

forked from qw_1215/Fyne 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
animation_test.go 823 Bytes
一键复制 编辑 原始数据 按行查看 历史
Andy Williams 提交于 2020-11-13 23:10 . Add missing tests
package fyne
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestAnimationLinear(t *testing.T) {
assert.Equal(t, float32(0.25), animationLinear(0.25))
}
func TestAnimationEaseInOut(t *testing.T) {
assert.Equal(t, float32(0.125), animationEaseInOut(0.25))
assert.Equal(t, float32(0.5), animationEaseInOut(0.5))
assert.Equal(t, float32(0.875), animationEaseInOut(0.75))
}
func TestAnimationEaseIn(t *testing.T) {
assert.Equal(t, float32(0.0625), animationEaseIn(0.25))
assert.Equal(t, float32(0.25), animationEaseIn(0.5))
assert.Equal(t, float32(0.5625), animationEaseIn(0.75))
}
func TestAnimationEaseOut(t *testing.T) {
assert.Equal(t, float32(0.4375), animationEaseOut(0.25))
assert.Equal(t, float32(0.75), animationEaseOut(0.5))
assert.Equal(t, float32(0.9375), animationEaseOut(0.75))
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/yh_work_space_admin/Fyne.git
[email protected]:yh_work_space_admin/Fyne.git
yh_work_space_admin
Fyne
Fyne
master

搜索帮助