@@ -4568,74 +4568,3 @@ func TestInvalidColor(t *testing.T) {
45684568 }
45694569 testWithFeatureFlag (t , tc , flags .ExperimentalAssetColors )
45704570}
4571-
4572- func TestColorWithAssetPrecision (t * testing.T ) {
4573- script := `
4574- send [USD/4 10] (
4575- source = @src \ "COL" allowing unbounded overdraft
4576- destination = @dest
4577- )
4578- `
4579-
4580- tc := NewTestCase ()
4581- tc .compile (t , script )
4582-
4583- tc .expected = CaseResult {
4584- Postings : []Posting {
4585- {
4586- Asset : "USD_COL/4" ,
4587- Amount : big .NewInt (10 ),
4588- Source : "src" ,
4589- Destination : "dest" ,
4590- },
4591- },
4592- }
4593- testWithFeatureFlag (t , tc , flags .ExperimentalAssetColors )
4594- }
4595-
4596- func TestInvalidColor (t * testing.T ) {
4597- script := `
4598- send [USD 10] (
4599- source = @src \ "!!" allowing unbounded overdraft
4600- destination = @dest
4601- )
4602- `
4603-
4604- tc := NewTestCase ()
4605- tc .compile (t , script )
4606-
4607- tc .expected = CaseResult {
4608- Error : machine.InvalidColor {
4609- Color : "!!" ,
4610- Range : parser .RangeOfIndexed (script , `"!!"` , 0 ),
4611- },
4612- }
4613- testWithFeatureFlag (t , tc , flags .ExperimentalAssetColors )
4614- }
4615-
4616- func TestEmptyColor (t * testing.T ) {
4617- // empty string color behaves as no color
4618-
4619- script := `
4620- send [COIN *] (
4621- source = @src \ "" // <- same as just '@src'
4622- destination = @dest
4623- )
4624- `
4625-
4626- tc := NewTestCase ()
4627- tc .setBalance ("src" , "COIN" , 100 )
4628- tc .compile (t , script )
4629-
4630- tc .expected = CaseResult {
4631- Postings : []Posting {
4632- {
4633- Asset : "COIN" ,
4634- Amount : big .NewInt (100 ),
4635- Source : "src" ,
4636- Destination : "dest" ,
4637- },
4638- },
4639- }
4640- testWithFeatureFlag (t , tc , flags .ExperimentalAssetColors )
4641- }
0 commit comments