我在Kotlin中有一个包含某些程序包级功能的文件。
//Logger.kt
fun info(tag : String, message : String){
...
}
fun error{....}
Run Code Online (Sandbox Code Playgroud)
我正在测试调用此kotlin文件的函数的类的函数,并且我想模拟它们。我知道包级别的函数就像Java中的静态方法一样,因此我一直在考虑使用PowerMock。
//MyClass: Class that calls Logger.kt functions
class MyClass {
fun myFunction(){
info("TAG", "Hello world!")
}
}
Run Code Online (Sandbox Code Playgroud)
有任何想法吗?
我正试图在这个tuto之后为android构建FFmpeg:http://www.roman10.net/how-to-build-ffmpeg-with-ndk-r9/
我正在使用:
我试图在MacOs和Ubuntu上构建,并且在执行./build_android.sh时遇到同样的错误:
`Creating config.mak, config.h, and doc/config.texi...
./build_android.sh: line 16: --prefix=/Users/jesusmartin92/Documents/android-ndk-r10d/sources/ffmpeg-2.5.4/android/arm: No such file or directory
./build_android.sh: line 18: --enable-shared: command not found
./build_android.sh: line 20: --disable-static: command not found
./build_android.sh: line 22: --disable-doc: command not found
./build_android.sh: line 24: --disable-ffmpeg: command not found
./build_android.sh: line 26: --disable-ffplay: command not found
./build_android.sh: line 28: --disable-ffprobe: command not found
./build_android.sh: line 30: --disable-ffserver: command not found
./build_android.sh: line 32: --disable-avdevice: command not found
./build_android.sh: …Run Code Online (Sandbox Code Playgroud)