Add more AC unit tests

pull/2936/head
Turo Lamminen 2020-01-21 14:48:37 +02:00
parent c407892c9c
commit d4d19b7062
1 changed files with 63 additions and 0 deletions

View File

@ -50,6 +50,63 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using namespace Assimp;
TEST(utACImportExport, importClosedLine) {
Assimp::Importer importer;
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/AC/closedLine.ac", aiProcess_ValidateDataStructure);
ASSERT_NE(nullptr, scene);
}
TEST(utACImportExport, importNoSurfaces) {
Assimp::Importer importer;
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/AC/nosurfaces.ac", aiProcess_ValidateDataStructure);
ASSERT_NE(nullptr, scene);
}
TEST(utACImportExport, importOpenLine) {
Assimp::Importer importer;
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/AC/openLine.ac", aiProcess_ValidateDataStructure);
ASSERT_NE(nullptr, scene);
}
TEST(utACImportExport, importSampleSubdiv) {
Assimp::Importer importer;
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/AC/sample_subdiv.ac", aiProcess_ValidateDataStructure);
ASSERT_NE(nullptr, scene);
}
TEST(utACImportExport, importSphereWithLight) {
Assimp::Importer importer;
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/AC/SphereWithLight.ac", aiProcess_ValidateDataStructure);
ASSERT_NE(nullptr, scene);
}
TEST(utACImportExport, importSphereWithLightUTF16) {
Assimp::Importer importer;
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/AC/SphereWithLight_UTF16LE.ac", aiProcess_ValidateDataStructure);
// FIXME: this is probably wrong, loading the file should succeed
ASSERT_EQ(nullptr, scene);
}
TEST(utACImportExport, importSphereWithLightUTF8BOM) {
Assimp::Importer importer;
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/AC/SphereWithLight_UTF8BOM.ac", aiProcess_ValidateDataStructure);
ASSERT_NE(nullptr, scene);
}
TEST(utACImportExport, importSphereWithLightUvScaling4X) {
Assimp::Importer importer;
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/AC/SphereWithLightUvScaling4X.ac", aiProcess_ValidateDataStructure);
ASSERT_NE(nullptr, scene);
}
TEST(utACImportExport, importWuson) {
Assimp::Importer importer;
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/AC/Wuson.ac", aiProcess_ValidateDataStructure);
@ -57,3 +114,9 @@ TEST(utACImportExport, importWuson) {
}
TEST(utACImportExport, testFormatDetection) {
Assimp::Importer importer;
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/AC/TestFormatDetection", aiProcess_ValidateDataStructure);
ASSERT_NE(nullptr, scene);
}