`timescale 1ns/1ps
`include "uvm_macros.svh"
import uvm_pkg::*;

class objection_test extends uvm_test;
  `uvm_component_utils(objection_test)
  int completed;
  bit migrated;
  function new(string name, uvm_component parent); super.new(name, parent); endfunction
  task run_phase(uvm_phase phase);
    migrated = $test$plusargs("MIGRATED");
    if (migrated) phase.raise_objection(this);
    else uvm_test_done_objection::get().raise_objection(this);
    #10;
    completed = 1;
    if (migrated) phase.drop_objection(this);
    else uvm_test_done_objection::get().drop_objection(this);
  endtask
  function void report_phase(uvm_phase phase);
    $display("REVIEW|run_completed|%0d", completed);
    $display("REVIEW|done|1");
  endfunction
endclass

module objection_probe;
  initial run_test("objection_test");
  initial begin #1000; $fatal(1, "Objection timeout"); end
endmodule
