diff options
author | ClementTsang <cjhtsang@uwaterloo.ca> | 2022-05-15 05:01:19 -0400 |
---|---|---|
committer | ClementTsang <cjhtsang@uwaterloo.ca> | 2022-05-15 21:02:33 -0400 |
commit | ba362f81c97b877e61ba1be7e33bb42b94e82418 (patch) | |
tree | d6b44adfa876e811e809d37c0bae9c21f663c203 /src/utils | |
parent | 05e9cd4d4dc756fdd923f2bb7d3ab38645df8ee3 (diff) |
bug: fix issues with macos and windows during refactor
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/gen_util.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/utils/gen_util.rs b/src/utils/gen_util.rs index ed3edcd3..c1dcef99 100644 --- a/src/utils/gen_util.rs +++ b/src/utils/gen_util.rs @@ -116,6 +116,7 @@ pub fn partial_ordering_rev<T: std::cmp::PartialOrd>(a: T, b: T) -> Ordering { pub fn get_ordering<T: std::cmp::PartialOrd>( a_val: T, b_val: T, reverse_order: bool, ) -> std::cmp::Ordering { + // FIXME: Maybe we can just delete this entirely and change references to use partial_ordering... match a_val.partial_cmp(&b_val) { Some(x) => match x { Ordering::Greater => { @@ -137,3 +138,23 @@ pub fn get_ordering<T: std::cmp::PartialOrd>( None => Ordering::Equal, } } + +#[cfg(test)] +mod test { + // use super::*; + + #[test] + fn test_sort_partial_fn() { + // FIXME: Do this + } + + #[test] + fn test_partial_ordering() { + // FIXME: Do this + } + + #[test] + fn test_reverse_partial_ordering() { + // FIXME: Do this + } +} |