I want to write a very simple test, and have it contained in a single file (the test).
class test_basic extends test_base ;
`uvm_component_utils(test_basic);
// ...
virtual task run_phase( uvm_phase phase );
phase.raise_objection(this, "Objection raised by test_base");
begin
txn_type txn;
txn = txn_type::type_id::create("txn",,);
// can't do this; it's just to illustrate my intent
start_item (txn, -1, a_sqr);
if(!txn.randomize() with {}) `uvm_error("RANDERR","Randomization error")
finish_item(txn);
end
phase.drop_objection(this, "Objection raised by test_base");
endtask
endclass
Can I do trivial tests like this without creating a sequence?