Skip to content

Commit

Permalink
test(NetCDF_variable):check "-" operand name match
Browse files Browse the repository at this point in the history
  • Loading branch information
rouson committed Oct 28, 2024
1 parent 2dd7bb4 commit 027f072
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions demo/src/NetCDF_variable_s.f90
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,12 @@ pure function double_precision_upper_bounds(NetCDF_variable) result(ubounds)
end procedure

module procedure default_real_subtract

call assert(lhs%conformable_with(rhs), "NetCDF_variable_s(default_real_subtract): lhs%conformable_with(rhs)")
call assert(lhs%name_==rhs%name_, "NetCDF_variable_s(default_real_subtract): lhs%name_==rhs%name_", lhs%name_//"/="//rhs%name_)

difference%name_ = lhs%name_

select case(lhs%rank())
case(1)
difference%values_1D_ = lhs%values_1D_ - rhs%values_1D_
Expand All @@ -281,7 +286,12 @@ pure function double_precision_upper_bounds(NetCDF_variable) result(ubounds)
end procedure

module procedure double_precision_subtract

call assert(lhs%conformable_with(rhs), "NetCDF_variable_s(double_precision_subtract): lhs%conformable_with(rhs)")
call assert(lhs%name_ == rhs%name_, "NetCDF_variable_s(double_precision_subtract): lhs%name_==rhs%name_",lhs%name_//"/="//rhs%name_)

difference%name_ = lhs%name_

select case(lhs%rank())
case(1)
difference%values_1D_ = lhs%values_1D_ - rhs%values_1D_
Expand Down

0 comments on commit 027f072

Please sign in to comment.