Skip to content

Commit

Permalink
Update test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
campbellpryde committed Jul 25, 2023
1 parent 2ad4428 commit 409a119
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 28 deletions.
Binary file modified unitTests/compiled/ut-ruleset.zip
Binary file not shown.
5 changes: 5 additions & 0 deletions unitTests/source/base/constants.xule
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@
constant $STATEMENT_CUBES = FILTER $INSTANCE1.taxonomy.cubes where $item.drs-role.description.contains('- Statement -')


/* Statement Cubes */

constant $NOTES_CUBES = FILTER $INSTANCE1.taxonomy.cubes where $item.drs-role.description.contains('- Disclosure -')


/* Constant representing an XBRL instance */

constant $INSTANCE3 = instance('https://www.sec.gov/Archives/edgar/data/1742770/000110465923049651/viot-20221231x20f.htm')
14 changes: 12 additions & 2 deletions unitTests/source/base/factFilters.xule
Original file line number Diff line number Diff line change
Expand Up @@ -404,16 +404,26 @@ output CUBEFILT001
list({covered @instance = $INSTANCE1 @cube in $STATEMENT_CUBES}).count

output CUBEFILT002
/* 243 */
/* 28 */

list({covered @instance = $INSTANCE1 @cube in $STATEMENT_CUBES @cube in $STATEMENT_CUBES}).count
list({covered @instance = $INSTANCE1 @cube in $STATEMENT_CUBES @cube not in $STATEMENT_CUBES}).count

output CUBEFILT003
/* 1185 */

list({covered @instance = $INSTANCE1 @cube not in $STATEMENT_CUBES}).count

output CUBEFILT004
/* 1185 */

list({covered @instance = $INSTANCE1 @cube in $STATEMENT_CUBES @cube in $NOTES_CUBES}).count

output CUBEFILT005
/* */

list({covered @instance = $INSTANCE1 @cube in $NOTES_CUBES}).count

output CUBEFILT006
/* 14 */

list({covered @instance = $INSTANCE1 @concept=PaymentsToAcquireProductiveAssets @cube.name = StatementTable @cube.drs-role = 'http://www.fcx.com/role/ConsolidatedStatementsofCashFlowsUnaudited'}).count
80 changes: 55 additions & 25 deletions unitTests/source/base/factFunctions.xule
Original file line number Diff line number Diff line change
@@ -1,110 +1,140 @@
/* FactFunctions */
/* FactFunctions */
output FACT001
/* -6 */

max(list([covered @instance = $INSTANCE1 @Assets])).decimals

output FACT002
/* None */

first(list([covered @instance = $INSTANCE1 @EarningsPerShareTextBlock])).decimals

output FACT003
/* 45436000000 */

max(list([covered @instance = $INSTANCE1 @Assets where $fact.decimals > -7]))

output FACT004
/* us-gaap:Assets */

max(list([covered @instance = $INSTANCE1 @Assets])).concept

output FACT005
/* None */

max(list([covered @instance = $INSTANCE1 @Assets where $fact.concept == Assets]))

output FACT006
/* 45436000000 */

max(list([covered @instance = $INSTANCE1 @Assets where $fact.concept.name == Assets]))

output FACT007
/* 44377 */

max(list([covered @instance = $INSTANCE1 @Assets])).period

output FACT008
/* 2021-01-01 to 2021-06-30 */

first(list([covered @instance = $INSTANCE1 @EarningsPerShareTextBlock])).period

output FACT009
/* 45436000000 */

max(list([covered @instance = $INSTANCE1 @Assets where $fact.period > date('2020-12-30')]))

output FACT010
/* USD */

max(list([covered @instance = $INSTANCE1 @Assets])).unit

output FACT011
/* None */

first(list([covered @instance = $INSTANCE1 @EarningsPerShareTextBlock])).unit

output FACT012
/* 45436000000 */

max(list([covered @instance = $INSTANCE1 @Assets where $fact.unit == unit(iso4217:USD)]))

output FACT013
/* http://www.sec.gov/CIK=0000831259 */

max(list([covered @instance = $INSTANCE1 @Assets])).entity

output FACT014
/* http://www.sec.gov/CIK=0000831259 */

first(list([covered @instance = $INSTANCE1 @EarningsPerShareTextBlock])).entity

output FACT015
/* 45436000000 */

max(list([covered @instance = $INSTANCE1 @Assets where $fact.entity.id == '0000831259']))

output FACT016
/* fcx:CopperInConcentratesMember */

max(list({covered @instance = $INSTANCE1 @RevenueFromContractWithCustomerIncludingAssessedTax @srt:ProductOrServiceAxis=*})).dimension(srt:ProductOrServiceAxis)

output FACT017
/* 1115000000 */

max(list({covered @instance = $INSTANCE1 @RevenueFromContractWithCustomerIncludingAssessedTax where $fact.dimension(srt:ProductOrServiceAxis).name == GoldMember }))

output FACT018
/* id3VybDovL2RvY3MudjEvZG9jOjBjNGY0MDFmYTkzZDQ2ZTI4ZThhZjAxZmZjM2Y0YTZlL3NlYzowYzRmNDAxZmE5M2Q0NmUyOGU4YWYwMWZmYzNmNGE2ZV84NS9mcmFnOjc3ODM5NWZjZGU2YjRlMGJhMzE3MGI3Nzc2NmFjMTNkL3RhYmxlOmMzZmNlZTEzMDUyNjRlYzc4NTYyYmVhM2Q0ZDVmYmFiL3RhYmxlcmFuZ2U6YzNmY2VlMTMwNTI2NGVjNzg1NjJiZWEzZDRkNWZiYWJfMjMtMzMtMS0xLTA_c4eb4598-51a9-477f-b124-4d491471499d */
/* */

max(list([covered @instance = $INSTANCE1 @PaymentsToAcquireProductiveAssets])).id

max(list([covered @instance = $INSTANCE1 @Assets])).id

output FACT019
/* */
/* none or 45436 */

max(list([covered @instance = $INSTANCE1 where $fact.id == 'id3VybDovL2RvY3MudjEvZG9jOjBjNGY0MDFmYTkzZDQ2ZTI4ZThhZjAxZmZjM2Y0YTZlL3NlYzowYzRmNDAxZmE5M2Q0NmUyOGU4YWYwMWZmYzNmNGE2ZV84NS9mcmFnOjc3ODM5NWZjZGU2YjRlMGJhMzE3MGI3Nzc2NmFjMTNkL3RhYmxlOmMzZmNlZTEzMDUyNjRlYzc4NTYyYmVhM2Q0ZDVmYmFiL3RhYmxlcmFuZ2U6YzNmY2VlMTMwNTI2NGVjNzg1NjJiZWEzZDRkNWZiYWJfMjMtMzMtMS0xLTA_c4eb4598-51a9-477f-b124-4d491471499d']))

output FACT020
/* 1739 */

max(list([covered @instance = $INSTANCE1 @Assets])).instance.facts.count

output FACT021
/* FACT021 - Property 'name' is not a property of a 'cube' */

max(list([covered @instance = $INSTANCE1 @Assets])).cubes.name

output FACT022
/* set(us-gaap:ScheduleOfCollaborativeArrangementsAndNoncollaborativeArrangementTransactionsTable, us-gaap:ScheduleOfSegmentReportingInformationBySegmentTable) */

max(list([covered @instance = $INSTANCE1 @Assets])).cubes.cube-concept

output FACT023
/* */

max(list({covered @instance = $INSTANCE3 @us-gaap-2022:AssetsFairValueDisclosure})).footnotes.role

output FACT024
/* */

max(list({covered @instance = $INSTANCE3 @concept=us-gaap-2022:AssetsFairValueDisclosure @us-gaap-2022:FairValueByFairValueHierarchyLevelAxis=us-gaap-2022:FairValueInputsLevel2Member})).footnotes.lang

output FACT025
/* */

max(list({covered @instance = $INSTANCE3 @concept=us-gaap-2022:AssetsFairValueDisclosure @us-gaap-2022:FairValueByFairValueHierarchyLevelAxis=FairValueInputsLevel2Member}))

output FACT026
/* */

max(list({covered @instance = $INSTANCE3 @us-gaap-2022:AssetsFairValueDisclosure @us-gaap-2022:FairValueByFairValueHierarchyLevelAxis=us-gaap-2022:FairValueInputsLevel2Member})).footnotes.footnote-role

output FACT027
/* */

max(list({covered @instance = $INSTANCE3 @concept=us-gaap-2022:AssetsFairValueDisclosure @us-gaap-2022:FairValueByFairValueHierarchyLevelAxis =us-gaap-2022:FairValueInputsLevel2Member})).footnotes.arcrole

output FACT028
/* */

max(list({covered @instance = $INSTANCE3 @concept=us-gaap-2022:AssetsFairValueDisclosure @us-gaap-2022:FairValueByFairValueHierarchyLevelAxis=us-gaap-2022:FairValueInputsLevel2Member})).footnotes.arcrole
2 changes: 1 addition & 1 deletion unitTests/source/base/inlineFunctions.xule
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
output INLIN001
/* */

{ @instance=$INSTANCE3 @concept=us-gaap-2022:RelatedPartyTransactionSellingGeneralAndAdministrativeExpensesFromTransactionsWithRelatedParty }.inline-ancestors
max(list({@instance = $INSTANCE3 @concept=us-gaap-2022:AssetsFairValueDisclosure})).footnotes.lang

output INLIN002
/* */
Expand Down

0 comments on commit 409a119

Please sign in to comment.