diff --git a/property_tests/tests/func/test/generate_tests.ts b/property_tests/tests/func/test/generate_tests.ts index ad13f8691e..bd1f7504ba 100644 --- a/property_tests/tests/func/test/generate_tests.ts +++ b/property_tests/tests/func/test/generate_tests.ts @@ -1,7 +1,7 @@ -import { deepEqual, getActor, Named } from 'azle/property_tests'; +import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; import { Func } from 'azle/property_tests/arbitraries/candid/reference/func_arb'; -import { Test } from 'azle/test'; +import { Test, testEquality } from 'azle/test'; export function generateTests( functionName: string, @@ -21,12 +21,10 @@ export function generateTests( ) ); - return { - Ok: deepEqual( - result, - returnFunc.value.agentResponseValue - ) - }; + return testEquality( + result, + returnFunc.value.agentResponseValue + ); } } ] diff --git a/property_tests/tests/int/test/generate_tests.ts b/property_tests/tests/int/test/generate_tests.ts index f5ee4c664c..0d356e15bf 100644 --- a/property_tests/tests/int/test/generate_tests.ts +++ b/property_tests/tests/int/test/generate_tests.ts @@ -1,6 +1,6 @@ -import { deepEqual, getActor, Named } from 'azle/property_tests'; +import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; -import { Test } from 'azle/test'; +import { Test, testEquality } from 'azle/test'; export function generateTests( functionName: string, @@ -24,9 +24,7 @@ export function generateTests( const result = await actor[functionName](...paramValues); - return { - Ok: deepEqual(result, expectedResult) - }; + return testEquality(result, expectedResult); } } ] diff --git a/property_tests/tests/int16/test/generate_tests.ts b/property_tests/tests/int16/test/generate_tests.ts index c71b2e8368..62725742e7 100644 --- a/property_tests/tests/int16/test/generate_tests.ts +++ b/property_tests/tests/int16/test/generate_tests.ts @@ -1,6 +1,6 @@ -import { deepEqual, getActor, Named } from 'azle/property_tests'; +import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; -import { Test } from 'azle/test'; +import { Test, testEquality } from 'azle/test'; export function generateTests( functionName: string, @@ -27,9 +27,7 @@ export function generateTests( const result = await actor[functionName](...paramValues); - return { - Ok: deepEqual(result, expectedResult) - }; + return testEquality(result, expectedResult); } } ] diff --git a/property_tests/tests/int32/test/generate_tests.ts b/property_tests/tests/int32/test/generate_tests.ts index a26a235294..f95ad9b64e 100644 --- a/property_tests/tests/int32/test/generate_tests.ts +++ b/property_tests/tests/int32/test/generate_tests.ts @@ -1,6 +1,6 @@ -import { deepEqual, getActor, Named } from 'azle/property_tests'; +import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; -import { Test } from 'azle/test'; +import { Test, testEquality } from 'azle/test'; export function generateTests( functionName: string, @@ -27,9 +27,7 @@ export function generateTests( const result = await actor[functionName](...paramValues); - return { - Ok: deepEqual(result, expectedResult) - }; + return testEquality(result, expectedResult); } } ] diff --git a/property_tests/tests/int64/test/generate_tests.ts b/property_tests/tests/int64/test/generate_tests.ts index 01edd1730e..2be510faaf 100644 --- a/property_tests/tests/int64/test/generate_tests.ts +++ b/property_tests/tests/int64/test/generate_tests.ts @@ -1,6 +1,6 @@ -import { deepEqual, getActor, Named } from 'azle/property_tests'; +import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; -import { Test } from 'azle/test'; +import { Test, testEquality } from 'azle/test'; export function generateTests( functionName: string, @@ -26,9 +26,7 @@ export function generateTests( const result = await actor[functionName](...paramValues); - return { - Ok: deepEqual(result, expectedResult) - }; + return testEquality(result, expectedResult); } } ] diff --git a/property_tests/tests/int8/test/generate_tests.ts b/property_tests/tests/int8/test/generate_tests.ts index b63b263e52..6ff0af87c6 100644 --- a/property_tests/tests/int8/test/generate_tests.ts +++ b/property_tests/tests/int8/test/generate_tests.ts @@ -1,6 +1,6 @@ -import { deepEqual, getActor, Named } from 'azle/property_tests'; +import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; -import { Test } from 'azle/test'; +import { Test, testEquality } from 'azle/test'; export function generateTests( functionName: string, @@ -26,9 +26,7 @@ export function generateTests( const result = await actor[functionName](...paramValues); - return { - Ok: deepEqual(result, expectedResult) - }; + return testEquality(result, expectedResult); } } ] diff --git a/property_tests/tests/nat/test/generate_tests.ts b/property_tests/tests/nat/test/generate_tests.ts index 98c25e8312..a24868b63e 100644 --- a/property_tests/tests/nat/test/generate_tests.ts +++ b/property_tests/tests/nat/test/generate_tests.ts @@ -1,6 +1,6 @@ -import { deepEqual, getActor, Named } from 'azle/property_tests'; +import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; -import { Test } from 'azle/test'; +import { Test, testEquality } from 'azle/test'; export function generateTests( functionName: string, @@ -24,9 +24,7 @@ export function generateTests( const result = await actor[functionName](...paramValues); - return { - Ok: deepEqual(result, expectedResult) - }; + return testEquality(result, expectedResult); } } ] diff --git a/property_tests/tests/nat16/test/generate_tests.ts b/property_tests/tests/nat16/test/generate_tests.ts index a2919564d7..75bd87c367 100644 --- a/property_tests/tests/nat16/test/generate_tests.ts +++ b/property_tests/tests/nat16/test/generate_tests.ts @@ -1,6 +1,6 @@ -import { deepEqual, getActor, Named } from 'azle/property_tests'; +import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; -import { Test } from 'azle/test'; +import { Test, testEquality } from 'azle/test'; export function generateTests( functionName: string, @@ -27,9 +27,7 @@ export function generateTests( const result = await actor[functionName](...paramValues); - return { - Ok: deepEqual(result, expectedResult) - }; + return testEquality(result, expectedResult); } } ] diff --git a/property_tests/tests/nat32/test/generate_tests.ts b/property_tests/tests/nat32/test/generate_tests.ts index 7ff0d4244d..709ba84432 100644 --- a/property_tests/tests/nat32/test/generate_tests.ts +++ b/property_tests/tests/nat32/test/generate_tests.ts @@ -1,6 +1,6 @@ -import { deepEqual, getActor, Named } from 'azle/property_tests'; +import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; -import { Test } from 'azle/test'; +import { Test, testEquality } from 'azle/test'; export function generateTests( functionName: string, @@ -27,9 +27,7 @@ export function generateTests( const result = await actor[functionName](...paramValues); - return { - Ok: deepEqual(result, expectedResult) - }; + return testEquality(result, expectedResult); } } ] diff --git a/property_tests/tests/nat64/test/generate_tests.ts b/property_tests/tests/nat64/test/generate_tests.ts index 56bc57c16c..e608ab1f8b 100644 --- a/property_tests/tests/nat64/test/generate_tests.ts +++ b/property_tests/tests/nat64/test/generate_tests.ts @@ -1,6 +1,6 @@ -import { deepEqual, getActor, Named } from 'azle/property_tests'; +import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; -import { Test } from 'azle/test'; +import { Test, testEquality } from 'azle/test'; export function generateTests( functionName: string, @@ -26,9 +26,7 @@ export function generateTests( const result = await actor[functionName](...paramValues); - return { - Ok: deepEqual(result, expectedResult) - }; + return testEquality(result, expectedResult); } } ] diff --git a/property_tests/tests/nat8/test/generate_tests.ts b/property_tests/tests/nat8/test/generate_tests.ts index fbbf4e7a98..a31a97d302 100644 --- a/property_tests/tests/nat8/test/generate_tests.ts +++ b/property_tests/tests/nat8/test/generate_tests.ts @@ -1,6 +1,6 @@ -import { deepEqual, getActor, Named } from 'azle/property_tests'; +import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; -import { Test } from 'azle/test'; +import { Test, testEquality } from 'azle/test'; export function generateTests( functionName: string, @@ -27,9 +27,7 @@ export function generateTests( const result = await actor[functionName](...paramValues); - return { - Ok: deepEqual(result, expectedResult) - }; + return testEquality(result, expectedResult); } } ] diff --git a/property_tests/tests/null/test/generate_tests.ts b/property_tests/tests/null/test/generate_tests.ts index da9350041c..8d5d0ad651 100644 --- a/property_tests/tests/null/test/generate_tests.ts +++ b/property_tests/tests/null/test/generate_tests.ts @@ -1,6 +1,6 @@ -import { deepEqual, getActor, Named } from 'azle/property_tests'; +import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; -import { Test } from 'azle/test'; +import { Test, testEquality } from 'azle/test'; export function generateTests( functionName: string, @@ -20,9 +20,7 @@ export function generateTests( ) ); - return { - Ok: deepEqual(result, null) - }; + return testEquality(result, null); } } ] diff --git a/property_tests/tests/opt/test/generate_tests.ts b/property_tests/tests/opt/test/generate_tests.ts index 2574e48dd7..bae894a4a4 100644 --- a/property_tests/tests/opt/test/generate_tests.ts +++ b/property_tests/tests/opt/test/generate_tests.ts @@ -1,7 +1,7 @@ -import { deepEqual, getActor, Named } from 'azle/property_tests'; +import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; import { Opt } from 'azle/property_tests/arbitraries/candid/constructed/opt_arb'; -import { Test } from 'azle/test'; +import { Test, testEquality } from 'azle/test'; export function generateTests( functionName: string, @@ -23,9 +23,7 @@ export function generateTests( const result = await actor[functionName](...params); - return { - Ok: deepEqual(expectedResult, result) - }; + return testEquality(result, expectedResult); } } ] diff --git a/property_tests/tests/principal/test/generate_tests.ts b/property_tests/tests/principal/test/generate_tests.ts index adccf33806..a0c95cdf65 100644 --- a/property_tests/tests/principal/test/generate_tests.ts +++ b/property_tests/tests/principal/test/generate_tests.ts @@ -1,7 +1,7 @@ import { Principal } from '@dfinity/principal'; -import { deepEqual, getActor, Named } from 'azle/property_tests'; +import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; -import { Test } from 'azle/test'; +import { Test, testEquality } from 'azle/test'; export function generateTests( functionName: string, @@ -25,7 +25,7 @@ export function generateTests( ) ); - return { Ok: deepEqual(result, expectedResult) }; + return testEquality(result, expectedResult); } } ] diff --git a/property_tests/tests/record/test/generate_tests.ts b/property_tests/tests/record/test/generate_tests.ts index 3b5bcd1c84..2a0dc710cb 100644 --- a/property_tests/tests/record/test/generate_tests.ts +++ b/property_tests/tests/record/test/generate_tests.ts @@ -1,7 +1,7 @@ -import { deepEqual, getActor, Named } from 'azle/property_tests'; +import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; import { Record } from 'azle/property_tests/arbitraries/candid/constructed/record_arb'; -import { Test } from 'azle/test'; +import { Test, testEquality } from 'azle/test'; export function generateTests( functionName: string, @@ -21,12 +21,10 @@ export function generateTests( ) ); - return { - Ok: deepEqual( - result, - returnRecord.value.agentResponseValue - ) - }; + return testEquality( + result, + returnRecord.value.agentResponseValue + ); } } ] diff --git a/property_tests/tests/recursive/test/generate_tests.ts b/property_tests/tests/recursive/test/generate_tests.ts index 234c5ec79a..9c27802fc5 100644 --- a/property_tests/tests/recursive/test/generate_tests.ts +++ b/property_tests/tests/recursive/test/generate_tests.ts @@ -1,7 +1,7 @@ -import { deepEqual, getActor, Named } from 'azle/property_tests'; +import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; import { Recursive } from 'azle/property_tests/arbitraries/candid/recursive'; -import { Test } from 'azle/test'; +import { Test, testEquality } from 'azle/test'; export function generateTests( functionName: string, @@ -21,12 +21,10 @@ export function generateTests( const result = await actor[functionName](...params); - return { - Ok: deepEqual( - result, - returnRecursive.value.agentResponseValue - ) - }; + return testEquality( + result, + returnRecursive.value.agentResponseValue + ); } } ] diff --git a/property_tests/tests/service/test/generate_tests.ts b/property_tests/tests/service/test/generate_tests.ts index 4abe1e70ee..7356346c22 100644 --- a/property_tests/tests/service/test/generate_tests.ts +++ b/property_tests/tests/service/test/generate_tests.ts @@ -1,7 +1,7 @@ import { Principal } from '@dfinity/principal'; import { Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; -import { Test } from 'azle/test'; +import { Test, testEquality } from 'azle/test'; import { execSync } from 'child_process'; export function generateTests( @@ -31,11 +31,10 @@ export function generateTests( .toString() .trim(); - return { - Ok: - result === - `(service "${returnService.value.agentArgumentValue.toText()}")` - }; + return testEquality( + result, + `(service "${returnService.value.agentArgumentValue.toText()}")` + ); } } ] diff --git a/property_tests/tests/text/test/generate_tests.ts b/property_tests/tests/text/test/generate_tests.ts index 18090ce7cd..1876c12bfd 100644 --- a/property_tests/tests/text/test/generate_tests.ts +++ b/property_tests/tests/text/test/generate_tests.ts @@ -1,6 +1,6 @@ -import { deepEqual, getActor, Named } from 'azle/property_tests'; +import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; -import { Test } from 'azle/test'; +import { Test, testEquality } from 'azle/test'; export function generateTests( functionName: string, @@ -24,9 +24,7 @@ export function generateTests( const result = await actor[functionName](...paramValues); - return { - Ok: deepEqual(result, expectedResult) - }; + return testEquality(result, expectedResult); } } ] diff --git a/property_tests/tests/tuple/test/generate_tests.ts b/property_tests/tests/tuple/test/generate_tests.ts index 5740c9a8fc..1d8d7747b1 100644 --- a/property_tests/tests/tuple/test/generate_tests.ts +++ b/property_tests/tests/tuple/test/generate_tests.ts @@ -1,10 +1,10 @@ -import { deepEqual, getActor, Named } from 'azle/property_tests'; +import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; import { ReturnTuple, Tuple } from 'azle/property_tests/arbitraries/candid/constructed/tuple_arb'; -import { Test } from 'azle/test'; +import { Test, testEquality } from 'azle/test'; export function generateTests( functionName: string, @@ -26,7 +26,7 @@ export function generateTests( ) ); - return { Ok: deepEqual(result, expectedResult) }; + return testEquality(result, expectedResult); } } ] diff --git a/property_tests/tests/variant/test/generate_tests.ts b/property_tests/tests/variant/test/generate_tests.ts index 700fe5cf93..78834fa68f 100644 --- a/property_tests/tests/variant/test/generate_tests.ts +++ b/property_tests/tests/variant/test/generate_tests.ts @@ -1,7 +1,7 @@ -import { deepEqual, getActor, Named } from 'azle/property_tests'; +import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; import { Variant } from 'azle/property_tests/arbitraries/candid/constructed/variant_arb'; -import { Test } from 'azle/test'; +import { Test, testEquality } from 'azle/test'; export function generateTests( functionName: string, @@ -23,9 +23,7 @@ export function generateTests( ) ); - return { - Ok: deepEqual(result, expectedResult) - }; + return testEquality(result, expectedResult); } } ] diff --git a/property_tests/tests/vec/test/generate_tests.ts b/property_tests/tests/vec/test/generate_tests.ts index 162e75c72c..0d80090cc0 100644 --- a/property_tests/tests/vec/test/generate_tests.ts +++ b/property_tests/tests/vec/test/generate_tests.ts @@ -1,6 +1,6 @@ -import { deepEqual, getActor, Named } from 'azle/property_tests'; +import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; -import { Test } from 'azle/test'; +import { Test, testEquality } from 'azle/test'; export function generateTests( functionName: string, @@ -21,9 +21,7 @@ export function generateTests( ); const result = await actor[functionName](...params); - return { - Ok: deepEqual(result, expectedResult) - }; + return testEquality(result, expectedResult); } } ]