Skip to content

Commit

Permalink
Not applicable comments
Browse files Browse the repository at this point in the history
  • Loading branch information
febo committed Dec 21, 2023
1 parent d751b53 commit 16b6bd5
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 58 deletions.
24 changes: 0 additions & 24 deletions programs/token-metadata/program/tests/burn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1188,7 +1188,6 @@ mod pnft_edition {
assert!(print_edition_account.is_none());
}

// TODO: test with Token-2022
#[test_case::test_case(spl_token::id() ; "Token Program")]
#[tokio::test]
async fn burn_edition_nft_in_separate_wallet(spl_token_program: Pubkey) {
Expand Down Expand Up @@ -1605,7 +1604,6 @@ mod pnft_edition {
assert_custom_error!(err, MetadataError::InvalidEditionMarker);
}

// TODO: test with Token-2022
#[test_case::test_case(spl_token::id() ; "Token Program")]
#[tokio::test]
pub async fn master_supply_is_decremented(spl_token_program: Pubkey) {
Expand Down Expand Up @@ -1732,7 +1730,6 @@ mod pnft_edition {
assert!(master_edition_struct.supply == 0);
}

// TODO: test with Token-2022
#[test_case::test_case(spl_token::id() ; "Token Program")]
#[tokio::test]
pub async fn edition_mask_changed_correctly(spl_token_program: Pubkey) {
Expand Down Expand Up @@ -1825,7 +1822,6 @@ mod pnft_edition {
assert!(ledger[1] == 0b1100_0000);
}

// TODO: test with Token-2022
#[test_case::test_case(spl_token::id() ; "Token Program")]
#[tokio::test]
pub async fn reprint_burned_edition(spl_token_program: Pubkey) {
Expand Down Expand Up @@ -2119,7 +2115,6 @@ mod nft {
da.assert_burned(&mut context).await.unwrap();
}

// TODO: test with Token-2022
#[test_case::test_case(spl_token::id() ; "Token Program")]
#[tokio::test]
async fn burning_decrements_collection_size(spl_token_program: Pubkey) {
Expand Down Expand Up @@ -2258,7 +2253,6 @@ mod nft {
}
}

// TODO: test with Token-2022
#[test_case::test_case(spl_token::id() ; "Token Program")]
#[tokio::test]
async fn burn_unsized_collection_item(spl_token_program: Pubkey) {
Expand Down Expand Up @@ -2484,7 +2478,6 @@ mod nft {
.unwrap();
}

// TODO: test with Token-2022
#[test_case::test_case(spl_token::id() ; "Token Program")]
#[tokio::test]
async fn fail_to_burn_master_edition_with_existing_prints(spl_token_program: Pubkey) {
Expand Down Expand Up @@ -2539,7 +2532,6 @@ mod nft {
assert_custom_error!(err, MetadataError::MasterEditionHasPrints);
}

// TODO: test with Token-2022
#[test_case::test_case(spl_token::id() ; "Token Program")]
#[tokio::test]
async fn require_md_account_to_burn_collection_nft(spl_token_program: Pubkey) {
Expand Down Expand Up @@ -2663,7 +2655,6 @@ mod nft {
assert_custom_error!(err, MetadataError::MissingCollectionMetadata);
}

// TODO: test with Token-2022
#[test_case::test_case(spl_token::id() ; "Token Program")]
#[tokio::test]
async fn only_owner_can_burn(spl_token_program: Pubkey) {
Expand Down Expand Up @@ -2725,7 +2716,6 @@ mod nft {
assert_custom_error!(err, MetadataError::InvalidAuthorityType);
}

// TODO: test with Token-2022
#[test_case::test_case(spl_token::id() ; "Token Program")]
#[tokio::test]
async fn update_authority_cannot_burn(spl_token_program: Pubkey) {
Expand Down Expand Up @@ -2811,7 +2801,6 @@ mod nft {
assert_custom_error!(err, MetadataError::InvalidAuthorityType);
}

// TODO: test with Token-2022
#[test_case::test_case(spl_token::id() ; "Token Program")]
#[tokio::test]
pub async fn cannot_burn_with_invalid_parents(spl_token_program: Pubkey) {
Expand Down Expand Up @@ -2885,7 +2874,6 @@ mod nft_edition {

use super::*;

// TODO: test with Token-2022
#[test_case::test_case(spl_token::id() ; "Token Program")]
#[tokio::test]
async fn burn_nonfungible_edition(spl_token_program: Pubkey) {
Expand Down Expand Up @@ -2990,7 +2978,6 @@ mod nft_edition {
assert!(print_edition_account.is_none());
}

// TODO: test with Token-2022
#[test_case::test_case(spl_token::id() ; "Token Program")]
#[tokio::test]
async fn burn_edition_nft_in_separate_wallet(spl_token_program: Pubkey) {
Expand Down Expand Up @@ -3108,7 +3095,6 @@ mod nft_edition {
assert!(!print_edition.exists_on_chain(&mut context).await);
}

// TODO: test with Token-2022
#[test_case::test_case(spl_token::id() ; "Token Program")]
#[tokio::test]
async fn only_owner_can_burn_edition(spl_token_program: Pubkey) {
Expand Down Expand Up @@ -3169,7 +3155,6 @@ mod nft_edition {
assert_custom_error!(err, MetadataError::InvalidAuthorityType);
}

// TODO: test with Token-2022
#[test_case::test_case(spl_token::id() ; "Token Program")]
#[tokio::test]
async fn update_authority_cannot_burn_edition(spl_token_program: Pubkey) {
Expand Down Expand Up @@ -3220,7 +3205,6 @@ mod nft_edition {
assert_custom_error!(err, MetadataError::InvalidAuthorityType);
}

// TODO: test with Token-2022
#[test_case::test_case(spl_token::id() ; "Token Program")]
#[tokio::test]
pub async fn no_master_edition(spl_token_program: Pubkey) {
Expand Down Expand Up @@ -3265,7 +3249,6 @@ mod nft_edition {
assert_custom_error!(err, MetadataError::NotAMasterEdition);
}

// TODO: test with Token-2022
#[test_case::test_case(spl_token::id() ; "Token Program")]
#[tokio::test]
async fn invalid_master_edition(spl_token_program: Pubkey) {
Expand Down Expand Up @@ -3339,7 +3322,6 @@ mod nft_edition {
assert_custom_error!(err, MetadataError::InvalidMasterEdition);
}

// TODO: test with Token-2022
#[test_case::test_case(spl_token::id() ; "Token Program")]
#[tokio::test]
pub async fn invalid_print_edition(spl_token_program: Pubkey) {
Expand Down Expand Up @@ -3408,7 +3390,6 @@ mod nft_edition {
assert_custom_error!(err, MetadataError::InvalidPrintEdition);
}

// TODO: test with Token-2022
#[test_case::test_case(spl_token::id() ; "Token Program")]
#[tokio::test]
pub async fn invalid_edition_marker(spl_token_program: Pubkey) {
Expand Down Expand Up @@ -3477,7 +3458,6 @@ mod nft_edition {
assert_custom_error!(err, MetadataError::InvalidEditionMarker);
}

// TODO: test with Token-2022
#[test_case::test_case(spl_token::id() ; "Token Program")]
#[tokio::test]
pub async fn master_supply_is_decremented(spl_token_program: Pubkey) {
Expand Down Expand Up @@ -3594,7 +3574,6 @@ mod nft_edition {
assert!(master_edition_struct.supply == 0);
}

// TODO: test with Token-2022
#[test_case::test_case(spl_token::id() ; "Token Program")]
#[tokio::test]
pub async fn edition_mask_changed_correctly(spl_token_program: Pubkey) {
Expand Down Expand Up @@ -3676,7 +3655,6 @@ mod nft_edition {
assert!(ledger[1] == 0b1100_0000);
}

// TODO: test with Token-2022
#[test_case::test_case(spl_token::id() ; "Token Program")]
#[tokio::test]
pub async fn reprint_burned_edition(spl_token_program: Pubkey) {
Expand Down Expand Up @@ -3766,7 +3744,6 @@ mod nft_edition {
assert_custom_error!(err, MetadataError::AlreadyInitialized);
}

// TODO: test with Token-2022
#[test_case::test_case(spl_token::id() ; "Token Program")]
#[tokio::test]
async fn cannot_modify_wrong_master_edition(spl_token_program: Pubkey) {
Expand Down Expand Up @@ -3825,7 +3802,6 @@ mod nft_edition {
assert_custom_error!(err, MetadataError::PrintEditionDoesNotMatchMasterEdition);
}

// TODO: test with Token-2022
#[test_case::test_case(spl_token::id() ; "Token Program")]
#[tokio::test]
async fn mint_mismatches(spl_token_program: Pubkey) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ mod process_legacy_instruction {
assert_custom_error!(error, MetadataError::InstructionNotSupported);
}

// TODO: test with Token-2022
#[test_case::test_case(spl_token::id() ; "Token Program")]
#[tokio::test]
async fn thaw_programmable_nft(spl_token_program: Pubkey) {
Expand Down
24 changes: 11 additions & 13 deletions programs/token-metadata/program/tests/unverify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ mod unverify_collection {
.await;
}

// TODO: test with Token-2022
#[test_case::test_case(spl_token_2022::id() ; "Token-2022 Program")]
#[test_case::test_case(spl_token::id() ; "Token Program")]
#[tokio::test]
async fn pass_with_changed_collection_update_authority(spl_token_program: Pubkey) {
Expand Down Expand Up @@ -1845,7 +1845,6 @@ mod unverify_collection {
.await;
}

// TODO: test with Token-2022
#[test_case::test_case(spl_token::id() ; "Token Program")]
#[tokio::test]
async fn burned_nft_collections_update_authority_cannot_unverify(spl_token_program: Pubkey) {
Expand Down Expand Up @@ -1969,7 +1968,6 @@ mod unverify_collection {
.await;
}

// TODO: test with Token-2022
#[test_case::test_case(spl_token::id() ; "Token Program")]
#[tokio::test]
async fn pass_unverify_burned_nft_parent_using_item_update_authority(
Expand Down Expand Up @@ -2093,8 +2091,8 @@ mod unverify_collection {
.await;
}

// TODO: test with Token-2022
#[test_case::test_case(spl_token::id() ; "Token Program")]
#[test_case::test_case(spl_token_2022::id() ; "Token-2022 Program")]
#[tokio::test]
async fn burned_pnft_collections_update_authority_cannot_unverify(spl_token_program: Pubkey) {
let mut context = program_test().start_with_context().await;
Expand Down Expand Up @@ -2179,8 +2177,8 @@ mod unverify_collection {
.await;
}

// TODO: test with Token-2022
#[test_case::test_case(spl_token::id() ; "Token Program")]
#[test_case::test_case(spl_token_2022::id() ; "Token-2022 Program")]
#[tokio::test]
async fn pass_unverify_burned_pnft_parent_using_item_update_authority(
spl_token_program: Pubkey,
Expand Down Expand Up @@ -2254,8 +2252,8 @@ mod unverify_collection {
.await;
}

// TODO: test with Token-2022
#[test_case::test_case(spl_token::id() ; "Token Program")]
#[test_case::test_case(spl_token_2022::id() ; "Token-2022 Program")]
#[tokio::test]
async fn pass_unverify_burned_pnft_parent_using_item_collection_delegate(
spl_token_program: Pubkey,
Expand Down Expand Up @@ -2340,8 +2338,8 @@ mod unverify_collection {
.await;
}

// TODO: test with Token-2022
#[test_case::test_case(spl_token::id() ; "Token Program")]
#[test_case::test_case(spl_token_2022::id() ; "Token-2022 Program")]
#[tokio::test]
async fn pass_unverify_burned_pnft_parent_using_item_collection_item_delegate(
spl_token_program: Pubkey,
Expand Down Expand Up @@ -2426,7 +2424,7 @@ mod unverify_collection {
.await;
}

// TODO: test with Token-2022
#[test_case::test_case(spl_token_2022::id() ; "Token-2022 Program")]
#[test_case::test_case(spl_token::id() ; "Token Program")]
#[tokio::test]
async fn collections_collection_delegate_cannot_unverify_burned_pnft_parent(
Expand All @@ -2447,7 +2445,7 @@ mod unverify_collection {
.await;
}

// TODO: test with Token-2022
#[test_case::test_case(spl_token_2022::id() ; "Token-2022 Program")]
#[test_case::test_case(spl_token::id() ; "Token Program")]
#[tokio::test]
async fn collections_collection_item_delegate_cannot_unverify_burned_pnft_parent(
Expand All @@ -2468,8 +2466,8 @@ mod unverify_collection {
.await;
}

// TODO: test with Token-2022
#[test_case::test_case(spl_token::id() ; "Token Program")]
#[test_case::test_case(spl_token_2022::id() ; "Token-2022 Program")]
#[tokio::test]
async fn collections_prgm_config_delegate_cannot_unverify_burned_pnft_parent(
spl_token_program: Pubkey,
Expand All @@ -2489,8 +2487,8 @@ mod unverify_collection {
.await;
}

// TODO: test with Token-2022
#[test_case::test_case(spl_token::id() ; "Token Program")]
#[test_case::test_case(spl_token_2022::id() ; "Token-2022 Program")]
#[tokio::test]
async fn items_prgm_config_delegate_cannot_unverify_burned_pnft_parent(
spl_token_program: Pubkey,
Expand Down Expand Up @@ -2605,8 +2603,8 @@ mod unverify_collection {
.await;
}

// TODO: test with Token-2022
#[test_case::test_case(spl_token::id() ; "Token Program")]
#[test_case::test_case(spl_token_2022::id() ; "Token-2022 Program")]
#[tokio::test]
async fn collections_utility_delegate_cannot_unverify_burned_pnft_parent(
spl_token_program: Pubkey,
Expand Down Expand Up @@ -2704,8 +2702,8 @@ mod unverify_collection {
.await;
}

// TODO: test with Token-2022
#[test_case::test_case(spl_token::id() ; "Token Program")]
#[test_case::test_case(spl_token_2022::id() ; "Token-2022 Program")]
#[tokio::test]
async fn items_utility_delegate_cannot_unverify_burned_pnft_parent(spl_token_program: Pubkey) {
let mut context = program_test().start_with_context().await;
Expand Down
Loading

0 comments on commit 16b6bd5

Please sign in to comment.