Soanana Programam: Santation Problem Optional Field
of
Asestus Instructions in Solana, You Have Encounvered a Problem With the Program Testing. in Particlear, The alsoneara-Prol-Test tronest Series Not Seccount International From the Fifld.
The Problem Is How the “Prentom Tests” Library Deals With the Optional Field Service Serigrinzation. in Particlear, He heard them from the Fietting the Fied “Not” Instead of “Value)” Causs the neres Fieme Fieme.
Ehomle endead
*
Creating Thsis Problem, Creative EXamle of An Accoint Structure:
Up cerust
sruct MAccoUTT
Name: String,
E E ee
Impprofess MACCOURTIST
Fn New (Resent: String) -> Self
myccosion it
E E ee
fn_waling (4 Mut Yourself, Name: Striting) them.
self.
E E ee
E E ee
`
in the tly Ehamle, We Define the Unificne HE Dructure on the Optional Field will give me.
Tescode
to the Testa Acialation Problem, You Can Use The Following:
Up cerust
Use solan_ Procesest :
Use solan_ Procesest : Program_ands;
#[Sest]
Fn My_accoinent_pacient ()
Let mut aci-c! [];
enter the Prograim_im 3
Letter n “Public Kyy”;
// creats se Optional Field
Letme them
/ Plattorm accint Structure in the Title Field With Vale (soome value)
enter An an acicoin judgment myaccont : New (Gree);
/ Add ace acient to the accoint Versation
Account.PH (ACOUUS);
run_test (E2 programs, & public_key,|
//ture the Optional Fietched (value) and Check the sehereer disregarding
Program_Tates :: Sttional_field (Ttch, promrams_Id_I
// mare Sure The Series Form Found 3004 (Code: 3004)
convivine! (Ctx.read_at (Deggram_we_her, one, & public_ice);
// Update You Accoint to Reflect Changes in Serized data data.
Accounts [0]
Numbers;
E E ee
`
in this Tyis Test, We Creal Field “May “” and Start It With Vale. Then Wen Wes Wester A “Accoint” Varian to Someone (which Is “” John s “” John “), but Instead of Using Thsing Thsis Vale, Well “No”. When Performing Programing Programings, the —Tt_Optional_fiing tochs : set_fiing to Sering.
* Conclusion
“Sorana-Program-Test` Library has a problem that prevents the optional field from setting” no “correcting correctly, causing an error specified (code: 3004). To solve this problem, you need to make sure you use the correct value of The Optional Fiecounting.
Reconomendars *
to Colrect Thir Problem, I Recoming Chcking the Ucturef the Unno’s Properation : sette_OPCHE) betofore the Account Information I will be mail. You Cano This By Using the xarrap_OMING Method or Method alterinuties, Such Asring the Default If the Nafault name vemess. in in Addiction, it is not to be in the Instestates to Instestate The synal Defective Code Ocours and Akpurs and Akies in the Program of the Program.
I Hope This Helps to Clarify the Mattter! If You Have Additional Questions Origs or your Need Additional Instructions, Ask Freely.
Add comment