Added DateTime test, added filetime functions to Catagories, and removed unused variables.

This commit is contained in:
bwhitn 2017-06-12 05:28:41 -07:00
parent ae38bb0927
commit 0c2c0d7b8b
4 changed files with 37 additions and 7 deletions

View File

@ -192,6 +192,8 @@ const Categories = [
"Translate DateTime Format", "Translate DateTime Format",
"From UNIX Timestamp", "From UNIX Timestamp",
"To UNIX Timestamp", "To UNIX Timestamp",
"From Windows Filetime To UNIX",
"To Windows Filetime From UNIX",
"Extract dates", "Extract dates",
] ]
}, },

View File

@ -80,13 +80,6 @@ const DateTime = {
}, },
/**
*@constant
*@default
*/
RADIX: ["Decimal", "Hex"],
/** /**
* Converts a Windows FILETIME to Unix Epoch time. * Converts a Windows FILETIME to Unix Epoch time.
* *

View File

@ -16,6 +16,7 @@ import "./tests/operations/ByteRepr.js";
import "./tests/operations/CharEnc.js"; import "./tests/operations/CharEnc.js";
import "./tests/operations/Code.js"; import "./tests/operations/Code.js";
import "./tests/operations/Compress.js"; import "./tests/operations/Compress.js";
import "./tests/operations/DateTime.js";
import "./tests/operations/FlowControl.js"; import "./tests/operations/FlowControl.js";
import "./tests/operations/Image.js"; import "./tests/operations/Image.js";
import "./tests/operations/MorseCode.js"; import "./tests/operations/MorseCode.js";

View File

@ -0,0 +1,34 @@
/**
* DateTime tests.
*
* @author bwhitn [brian.m.whitney@outlook.com]
*
* @copyright Crown Copyright 2017
* @license Apache-2.0
*/
import TestRegister from "../../TestRegister.js";
TestRegister.addTests([
{
name: "Filetime to Unix",
input: "129207366395297693",
expectedOutput: "1276263039529769300",
recipeConfig: [
{
op: "Windows Filetime to UNIX Timestamp",
args: ["Nanoseconds (ns)"],
},
],
},
{
name: "Unix to Filetime",
input: "1276263039529769300",
expectedOutput: "129207366395297693",
recipeConfig: [
{
op: "UNIX Timestamp to Windows Filetime",
args: ["Nanoseconds (ns)"],
},
],
},
]);