2023-08-22 08:27:30 +00:00
|
|
|
package funkin.util.assets;
|
|
|
|
|
|
|
|
import openfl.utils.Assets;
|
|
|
|
import massive.munit.util.Timer;
|
|
|
|
import massive.munit.Assert;
|
|
|
|
import massive.munit.async.AsyncFactory;
|
|
|
|
import funkin.util.assets.DataAssets;
|
|
|
|
|
2023-08-30 22:31:59 +00:00
|
|
|
@:nullSafety
|
2023-08-22 08:27:30 +00:00
|
|
|
@:access(funkin.util.assets.DataAssets)
|
|
|
|
class DataAssetsTest extends FunkinTest
|
|
|
|
{
|
|
|
|
public function new()
|
|
|
|
{
|
|
|
|
super();
|
|
|
|
}
|
|
|
|
|
|
|
|
@BeforeClass
|
|
|
|
public function beforeClass() {}
|
|
|
|
|
|
|
|
@AfterClass
|
|
|
|
public function afterClass() {}
|
|
|
|
|
|
|
|
@Before
|
|
|
|
public function setup() {}
|
|
|
|
|
|
|
|
@After
|
|
|
|
public function tearDown() {}
|
|
|
|
|
|
|
|
@Test
|
|
|
|
public function testBuildDataPath()
|
|
|
|
{
|
|
|
|
Assert.areEqual('assets/data/test.json', DataAssets.buildDataPath('test.json'));
|
|
|
|
}
|
|
|
|
|
|
|
|
@Test
|
|
|
|
public function listDataFilesInPath()
|
|
|
|
{
|
|
|
|
var expected = ['blablabla', 'test1', 'test2'];
|
|
|
|
|
|
|
|
Assert.areEqual(expected, DataAssets.listDataFilesInPath('test/'));
|
|
|
|
}
|
|
|
|
}
|