Current test output:
E:\dev\git\xedit-lib\test\Delphi-mahogany\Debug\Win32>DelphiTest.exe
XEditLib v0.0.0.219
Loading Skyrim.esm (1/7)
Loading Update.esm (2/7)
Loading xtest-1.esp (3/7)
Loading xtest-2.esp (4/7)
Loading xtest-3.esp (5/7)
Loading xtest-4.esp (6/7)
Loading xtest-5.esp (7/7)
Done loading files.
Meta Methods
GetGlobal
Should have the ProgramPath global
Should have the Version global
Should have the GameName global
Should have the AppName global
Should have the LongGameName global
Should have the DataPath global
Should fail if global does not exist
Release
Should fail if handle is not allocated
Should fail if null handle is passed
Should free an allocated handle
ResetStore
Should clear all handles
File Handling Functions
FileByName
Should return a handle if a matching file is loaded
Should return return 0 if a matching file is not loaded
FileByIndex
Should return a handle if the index is in bounds
Should return return 0 if index is out of bounds
FileByLoadOrder
Should return a handle if the index is in bounds
Should return return 0 if index is out of bounds
FileByAuthor
Should return a handle if a matching file is loaded
Should return return 0 if a matching file is not loaded
File Value Functions
GetFileName
Should match filename used with FileByName
GetAuthor
Should match author used with FileByAuthor
GetDescription
Should return an empty string if plugin has no description
Should return the description if defined
GetIsESM
Should return true for ESM files
Should return true for ESP files with the IsESM flag
Should return false for ESP files without the IsESM flag
GetNextObjectID
Should return an integer > 0 for Skyrim.esm
Should equal 2048 for xtest-1.esp
GetFileHeader
Should return a handle if input resolves to a file
OverrideRecordCount
Should return an integer > 0 for a plugin with overrides
Should return 0 for a plugin with no records
SetAuthor
Should set the author
Should be able to unset the author
SetDescription
Should create element and set description if the plugin has no description element
Should be able to unset the description
SetIsESM
Should be able to set the ESM flag
Should be able to unset the ESM flag
SetNextObjectID
Should set the next object ID
Element Handling
GetElement
File resolution by index
Should return a handle if the index is in bounds
Should fail if index is out of bounds
File resolution by name
Should return a handle if a matching file is loaded
Should fail if a matching file is not loaded
File element resolution by index
Should return a handle if the index is in bounds
Should fail if index is out of bounds
File group resolution by signature
Should return a handle if the group exists
Should fail if the group does not exist
Group element resolution by index
Should return a handle if the index is in bounds
Should fail if index is out of bounds
Group record resolution by FormID
Should return a handle if the record exists
Should fail if the record does not exist
Record element resolution by index
Should return a handle if the index is in bounds
Should fail if index is out of bounds
Record element resolution by signature
Should return a handle if the element exists
Should fail if the element does not exist
Record element resolution by name
Should return a handle if the element exists
Should fail if the element does not exist
Record element resolution by path
Should return a handle if the element exists
Nested resolution
Should resolve nested indexes correctly if the indexes are all in bounds
Should fail if any index is out of bounds
Should resolve paths correctly if valid
Should fail if any subpath is invalid
GetElements
Should resolve root children (files)
Should resolve file children (file header and groups)
Should resolve group children (records)
Should resolve record children (subrecords/elements)
Should resolve element children
GetElementFile
Should return the input if the input is a file
Should return the file containing a group
Should return the file containing a record
Should return the file containing an element
GetContainer
Should return the file containing a group
Should return the group containing a record
Should return the record containing an element
Should return the parent element containing a child element
Should fail if called on a file
NewElement
Should create a new file if no handle given
Should be able to add groups to files
Should be able to add records to groups
Should be able to create a new element on a record
Should be able to push a new element onto an array
Should be able to assign an element at an index in an array
Should fail if parent element is not a container
RemoveElement
Should remove the element at the given path
Should remove the element at the given indexed path
FAILED: The element should no longer be present
Should remove the element passed if no path is given
Should fail if a null handle is passed
Should fail if no element exists at the given path
Element Values
Name
Should resolve file names
Group names
Should resolve top level group names
Should resolve block names
Should resolve sub-block names
Should resolve child group names
Should resolve persistent/temporary group names
Record names
Should resolve FULL name, if present
Should resolve BASE name, if present
Should resolve element names
Path
Should resolve file names
Should resolve group signatures
Should resolve block names
Should resolve sub-block names
Should resolve child groups
Should resolve temporary/persistent groups
Should resolve record FormIDs
Should resolve element names
Should resolve array element indexes
EditorID
Should fail if a file is passed
Should fail if a group is passed
Should fail if an element is passed
Should return EditorID if a record is passed
Signature
Should fail if a file is passed
Should fail if an element with no signature is passed
Should resolve group signatures
Should resolve record signatures
Should resolve element signatures
FullName
Should fail if a file is passed
Should fail if a group is passed
Should fail if an element is passed
Should fail if a record with no full name is passed
Should return Full Name if a record is passed
GetValue
Should resolve element values
Should resolve element value at path
121 specs, 1 failures
We're doing pretty good. Below is an overview of current progress:
xeMeta: 12 functions, 3 tested
xeSetup: 4 functions, 0 tested
xeFiles: 7 functions, 4 tested
xeFileValues: 11 functions, 11 tested
xeMasters: 9 functions, 5 unimplemented, 0 tested
xeElements: 20 functions, 5 unimplemented, 6 tested
xeElementValues: 30 functions, 10 unimplemented, 6 tested
xeGroups: 7 functions, 0 tested
xeRecords: 10 functions, 0 tested
100 planned functions
80 implemented functions
20 unimplemented functions
30 tested functions
It's likely that not all functions will be tested in the initial release. I expect to make an initial release within the next few weeks.
Edited by Mator, 04 January 2017 - 01:05 AM.