esmf-org / esmf

The Earth System Modeling Framework (ESMF) is a suite of software tools for developing high-performance, multi-component Earth science modeling applications.
https://earthsystemmodeling.org/
Other
156 stars 75 forks source link

Potentially Fixes #288 ESMF_ArrayCreateGetUTest #289

Closed danrosen25 closed 1 week ago

danrosen25 commented 4 weeks ago

Potentially Fixes #288 ESMF_ArrayCreateGetUTest where data in arrayDup is not initialized and compared to data in array.

danrosen25 commented 4 weeks ago

@theurich How about the new changes, where I fill the array with a number between 0 and 1000 (inclusive of 0 and exclusive of 1000)?

theurich commented 4 weeks ago

@theurich How about the new changes, where I fill the array with a number between 0 and 1000 (inclusive of 0 and exclusive of 1000)?

@danrosen25 I like this version! However, I am going to tag @billsacks here, since he had valid concerns about use of "randomness" in testing before. I agree with him that it is generally a bad idea to have randomness in tests, because you loose reproducibility, which is a pain to deal with when things are failing. However, here I think the situation is random already, due to the uninitialized data.... so in my mind I do not see a problem with use of random_number in filling the array that the other random data is compared against. Still, I am interested to see what Bill thinks about this situation.

danrosen25 commented 2 weeks ago

@billsacks If you're okay with the comment I added then I'll squash merge this into develop. Thanks!