From be3ab9902fe6657c470317caf63faf2a566d690b Mon Sep 17 00:00:00 2001 From: acheron <98934430+acheroncrypto@users.noreply.github.com> Date: Sat, 16 Nov 2024 23:59:20 +0100 Subject: [PATCH] tests: Remove `docs` test (#3367) --- tests/docs/Anchor.toml | 11 ------- tests/docs/Cargo.toml | 8 ----- tests/docs/package.json | 19 ----------- tests/docs/programs/docs/Cargo.toml | 17 ---------- tests/docs/programs/docs/Xargo.toml | 2 -- tests/docs/programs/docs/src/lib.rs | 50 ----------------------------- 6 files changed, 107 deletions(-) delete mode 100644 tests/docs/Anchor.toml delete mode 100644 tests/docs/Cargo.toml delete mode 100644 tests/docs/package.json delete mode 100644 tests/docs/programs/docs/Cargo.toml delete mode 100644 tests/docs/programs/docs/Xargo.toml delete mode 100644 tests/docs/programs/docs/src/lib.rs diff --git a/tests/docs/Anchor.toml b/tests/docs/Anchor.toml deleted file mode 100644 index 82be99c67c..0000000000 --- a/tests/docs/Anchor.toml +++ /dev/null @@ -1,11 +0,0 @@ -[provider] -cluster = "localnet" -wallet = "~/.config/solana/id.json" - -[programs.localnet] -errors = "Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS" - -[scripts] -test = "yarn run mocha -t 1000000 tests/" - -[features] diff --git a/tests/docs/Cargo.toml b/tests/docs/Cargo.toml deleted file mode 100644 index 97d6280542..0000000000 --- a/tests/docs/Cargo.toml +++ /dev/null @@ -1,8 +0,0 @@ -[workspace] -members = [ - "programs/*" -] -resolver = "2" - -[profile.release] -overflow-checks = true diff --git a/tests/docs/package.json b/tests/docs/package.json deleted file mode 100644 index dc6f8f9c95..0000000000 --- a/tests/docs/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "errors", - "version": "0.30.1", - "license": "(MIT OR Apache-2.0)", - "homepage": "https://github.com/coral-xyz/anchor#readme", - "bugs": { - "url": "https://github.com/coral-xyz/anchor/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/coral-xyz/anchor.git" - }, - "engines": { - "node": ">=17" - }, - "scripts": { - "test": "anchor test" - } -} diff --git a/tests/docs/programs/docs/Cargo.toml b/tests/docs/programs/docs/Cargo.toml deleted file mode 100644 index b04efa0770..0000000000 --- a/tests/docs/programs/docs/Cargo.toml +++ /dev/null @@ -1,17 +0,0 @@ -[package] -name = "docs" -version = "0.1.0" -description = "Created with Anchor" -edition = "2018" - -[lib] -crate-type = ["cdylib", "lib"] -name = "errors" - -[features] -no-entrypoint = [] -cpi = ["no-entrypoint"] -idl-build = ["anchor-lang/idl-build"] - -[dependencies] -anchor-lang = { path = "../../../../lang" } diff --git a/tests/docs/programs/docs/Xargo.toml b/tests/docs/programs/docs/Xargo.toml deleted file mode 100644 index 1744f098ae..0000000000 --- a/tests/docs/programs/docs/Xargo.toml +++ /dev/null @@ -1,2 +0,0 @@ -[target.bpfel-unknown-unknown.dependencies.std] -features = [] \ No newline at end of file diff --git a/tests/docs/programs/docs/src/lib.rs b/tests/docs/programs/docs/src/lib.rs deleted file mode 100644 index 710a2fe026..0000000000 --- a/tests/docs/programs/docs/src/lib.rs +++ /dev/null @@ -1,50 +0,0 @@ -//! This example enforces the missing documentation lint. -#![deny(missing_docs)] - -use anchor_lang::prelude::*; - -declare_id!("Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS"); - -/// Program for testing that the `missing_docs` lint can be applied. -#[program] -mod docs { - use super::*; - - /// Hello. - pub fn hello(_ctx: Context) -> Result<()> { - err!(MyError::Hello) - } -} - -/// Hello accounts. -#[derive(Accounts)] -pub struct Hello<'info> { - /// Rent sysvar. - /// Multi line docs. - pub rent: Sysvar<'info, Rent>, - /// Composite accounts test. - /// Multiple lines supported. - /// You can also include "double quotes". - pub other: HelloComposite<'info>, -} - -/// Hello accounts. -#[derive(Accounts)] -pub struct HelloComposite<'info> { - /// Rent sysvar 2. - pub rent2: Sysvar<'info, Rent>, -} - -/// MyError. -#[error_code] -pub enum MyError { - /// test - #[msg("This is an error message clients will automatically display")] - Hello, - /// test2 - HelloNoMsg = 123, - /// test3 - HelloNext, - /// test4 - HelloCustom, -}