Remove old BSA tests

deque
scrawl 10 years ago
parent 18be152ab1
commit fc4f069d0f

@ -1,3 +0,0 @@
*_test
bsatool
*.bsa

@ -1,15 +0,0 @@
GCC=g++
all: bsa_file_test ogre_archive_test
I_OGRE=$(shell pkg-config --cflags OGRE)
L_OGRE=$(shell pkg-config --libs OGRE)
bsa_file_test: bsa_file_test.cpp ../bsa_file.cpp
$(GCC) $^ -o $@
ogre_archive_test: ogre_archive_test.cpp ../bsa_file.cpp ../bsa_archive.cpp
$(GCC) $^ -o $@ $(I_OGRE) $(L_OGRE)
clean:
rm *_test

@ -1,44 +0,0 @@
#include "../bsa_file.hpp"
/*
Test of the BSAFile class
This test requires that data/Morrowind.bsa exists in the root
directory of OpenMW.
*/
#include <iostream>
using namespace std;
using namespace Bsa;
BSAFile bsa;
void find(const char* file)
{
cout << "Does file '" << file << "' exist?\n ";
if(bsa.exists(file))
{
cout << "Yes.\n ";
cout << bsa.getFile(file)->size() << " bytes\n";
}
else cout << "No.\n";
}
int main()
{
cout << "Reading Morrowind.bsa\n";
bsa.open("../../data/Morrowind.bsa");
const BSAFile::FileList &files = bsa.getList();
cout << "First 10 files in archive:\n";
for(int i=0; i<10; i++)
cout << " " << files[i].name
<< " (" << files[i].fileSize << " bytes @"
<< files[i].offset << ")\n";
find("meshes\\r\\xnetch_betty.nif");
find("humdrum");
}

@ -1,34 +0,0 @@
#include <Ogre.h>
#include <iostream>
// This is a test of the BSA archive handler for OGRE.
#include "../bsa_archive.hpp"
using namespace Ogre;
using namespace std;
int main()
{
// Disable Ogre logging
new LogManager;
Log *log = LogManager::getSingleton().createLog("");
log->setDebugOutputEnabled(false);
// Set up Root
Root *root = new Root("","","");
// Add the BSA
Bsa::addBSA("../../data/Morrowind.bsa");
// Pick a sample file
String tex = "textures\\tx_natural_cavern_wall13.dds";
cout << "Opening file: " << tex << endl;
// Get it from the resource system
DataStreamPtr data = ResourceGroupManager::getSingleton().openResource(tex, "General");
cout << "Size: " << data->size() << endl;
return 0;
}

@ -1,17 +0,0 @@
Reading Morrowind.bsa
First 10 files in archive:
meshes\m\probe_journeyman_01.nif (6276 bytes @126646052)
textures\menu_rightbuttonup_top.dds (256 bytes @218530052)
textures\menu_rightbuttonup_right.dds (256 bytes @218529796)
textures\menu_rightbuttonup_left.dds (256 bytes @218529540)
textures\menu_rightbuttondown_top.dds (256 bytes @218528196)
meshes\b\b_n_redguard_f_skins.nif (41766 bytes @17809778)
meshes\b\b_n_redguard_m_skins.nif (41950 bytes @18103107)
meshes\b\b_n_redguard_f_wrist.nif (2355 bytes @17858132)
meshes\b\b_n_redguard_m_foot.nif (4141 bytes @17862081)
meshes\b\b_n_redguard_m_knee.nif (2085 bytes @18098101)
Does file 'meshes\r\xnetch_betty.nif' exist?
Yes.
53714 bytes
Does file 'humdrum' exist?
No.

@ -1,2 +0,0 @@
Opening file: textures\tx_natural_cavern_wall13.dds
Size: 43808

@ -1,18 +0,0 @@
#!/bin/bash
make || exit
mkdir -p output
PROGS=*_test
for a in $PROGS; do
if [ -f "output/$a.out" ]; then
echo "Running $a:"
./$a | diff output/$a.out -
else
echo "Creating $a.out"
./$a > "output/$a.out"
git add "output/$a.out"
fi
done
Loading…
Cancel
Save