osmosis-labs / test-tube

Test tube for cosmos-sdk chains integration test, written in Rust!
Apache License 2.0
53 stars 31 forks source link

Change of visibility in macro #54

Open 0xstepit opened 4 months ago

0xstepit commented 4 months ago

The macro fn_execute change the visibility of the created function when pub is not specified.

($name:ident: $req:ty[$type_url:expr] => $res:ty) => {
    pub fn $name(
        &self,
        msg: $req,
        signer: &$crate::SigningAccount,
    ) -> $crate::RunnerExecuteResult<$res> {
        self.runner.execute(msg, $type_url, signer)
    }
};
($name:ident: $req:ty => $res:ty) => {
    pub fn $name(
        &self,
        msg: $req,
        signer: &$crate::SigningAccount,
    ) -> $crate::RunnerExecuteResult<$res> {
        self.runner.execute(msg, <$req>::TYPE_URL, signer)
    }
};

I saw that in fn_query the visibility is maintained. Is this intentional? Thanks!

iboss-ptk commented 3 months ago

Nice catch! will work on it!

0xstepit commented 3 months ago

@iboss-ptk here the fix https://github.com/osmosis-labs/test-tube/pull/55