Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fc1943s committed Dec 5, 2024
1 parent 54ccb7c commit dfa7c40
Show file tree
Hide file tree
Showing 18 changed files with 3,712 additions and 3,389 deletions.
914 changes: 457 additions & 457 deletions apps/chat/contract/chat_contract.fsx

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions apps/chat/contract/chat_contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -474,23 +474,23 @@ mod module_31a2fc18 {
v4: LrcPtr<Chat_contract::Mut4>,
v5: Option<i64>,
) -> string {
let v256: u64 = near_sdk::env::block_timestamp();
let v270: Chat_contract::US2 =
let v272: u64 = near_sdk::env::block_timestamp();
let v286: Chat_contract::US2 =
defaultValue(Chat_contract::US2::US2_1, map(Chat_contract::method7(), v5));
let v282: u64 = match &v270 {
Chat_contract::US2::US2_0(v270_0_0) => {
v256 - match &v270 {
let v298: u64 = match &v286 {
Chat_contract::US2::US2_0(v286_0_0) => {
v272 - match &v286 {
Chat_contract::US2::US2_0(x) => x.clone(),
_ => unreachable!(),
} as u64
}
_ => v256,
_ => v272,
} / 1000000000_u64;
let v283: u64 = v282 % 60_u64;
let v285: u64 = v282 / 60_u64 % 60_u64;
let v287: u64 = v282 / 3600_u64 % 24_u64;
let v289: std::string::String = format!("{:02}:{:02}:{:02}", v287, v285, v283);
fable_library_rust::String_::fromString(v289)
let v299: u64 = v298 % 60_u64;
let v301: u64 = v298 / 60_u64 % 60_u64;
let v303: u64 = v298 / 3600_u64 % 24_u64;
let v305: std::string::String = format!("{:02}:{:02}:{:02}", v303, v301, v299);
fable_library_rust::String_::fromString(v305)
}
pub fn method12() -> string {
string("")
Expand Down
22 changes: 11 additions & 11 deletions lib/spiral/common_contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -507,22 +507,22 @@ pub mod Common {
v4: LrcPtr<Common::Mut4>,
v5: Option<i64>,
) -> string {
let v256: u64 = near_sdk::env::block_timestamp();
let v270: Common::US2 = defaultValue(Common::US2::US2_1, map(Common::method10(), v5));
let v282: u64 = match &v270 {
Common::US2::US2_0(v270_0_0) => {
v256 - match &v270 {
let v272: u64 = near_sdk::env::block_timestamp();
let v286: Common::US2 = defaultValue(Common::US2::US2_1, map(Common::method10(), v5));
let v298: u64 = match &v286 {
Common::US2::US2_0(v286_0_0) => {
v272 - match &v286 {
Common::US2::US2_0(x) => x.clone(),
_ => unreachable!(),
} as u64
}
_ => v256,
_ => v272,
} / 1000000000_u64;
let v283: u64 = v282 % 60_u64;
let v285: u64 = v282 / 60_u64 % 60_u64;
let v287: u64 = v282 / 3600_u64 % 24_u64;
let v289: std::string::String = format!("{:02}:{:02}:{:02}", v287, v285, v283);
fable_library_rust::String_::fromString(v289)
let v299: u64 = v298 % 60_u64;
let v301: u64 = v298 / 60_u64 % 60_u64;
let v303: u64 = v298 / 3600_u64 % 24_u64;
let v305: std::string::String = format!("{:02}:{:02}:{:02}", v303, v301, v299);
fable_library_rust::String_::fromString(v305)
}
pub fn method15() -> string {
string("")
Expand Down
22 changes: 11 additions & 11 deletions lib/spiral/crypto_contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -475,22 +475,22 @@ pub mod Crypto {
v4: LrcPtr<Crypto::Mut5>,
v5: Option<i64>,
) -> string {
let v256: u64 = near_sdk::env::block_timestamp();
let v270: Crypto::US2 = defaultValue(Crypto::US2::US2_1, map(Crypto::method12(), v5));
let v282: u64 = match &v270 {
Crypto::US2::US2_0(v270_0_0) => {
v256 - match &v270 {
let v272: u64 = near_sdk::env::block_timestamp();
let v286: Crypto::US2 = defaultValue(Crypto::US2::US2_1, map(Crypto::method12(), v5));
let v298: u64 = match &v286 {
Crypto::US2::US2_0(v286_0_0) => {
v272 - match &v286 {
Crypto::US2::US2_0(x) => x.clone(),
_ => unreachable!(),
} as u64
}
_ => v256,
_ => v272,
} / 1000000000_u64;
let v283: u64 = v282 % 60_u64;
let v285: u64 = v282 / 60_u64 % 60_u64;
let v287: u64 = v282 / 3600_u64 % 24_u64;
let v289: std::string::String = format!("{:02}:{:02}:{:02}", v287, v285, v283);
fable_library_rust::String_::fromString(v289)
let v299: u64 = v298 % 60_u64;
let v301: u64 = v298 / 60_u64 % 60_u64;
let v303: u64 = v298 / 3600_u64 % 24_u64;
let v305: std::string::String = format!("{:02}:{:02}:{:02}", v303, v301, v299);
fable_library_rust::String_::fromString(v305)
}
pub fn method17() -> string {
string("")
Expand Down
8 changes: 4 additions & 4 deletions lib/spiral/date_time.dib
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ inl time_zone_local () : time_zone_info =
inl get_utc_offset (time_zone_info : time_zone_info) (date_time : date_time) : time_span =
run_target function
| Fsharp _ => fun () => date_time |> $'_.GetUtcOffset' (time_zone_local ())
| Rust _ => fun () =>
| Rust (Native | Wasm) => fun () =>
open rust.rust_operators
inl ticks = date_time |> ticks
inl ticks = ticks |> rust.rust.emit
Expand All @@ -809,15 +809,15 @@ inl get_utc_offset (time_zone_info : time_zone_info) (date_time : date_time) : t

#!spiral

let date_time_guid_from_date_time (guid : guid.guid) (date_time : date_time) =
let date_time_guid_from_date_time (guid' : guid.guid) (date_time : date_time) =
inl create prefix time_zone : date_time_guid =
inl guid_range =
guid
guid'
|> sm'.obj_to_string
|> sm'.range
(am'.Start ((prefix |> sm'.length |> fun x => x : i32) + (time_zone |> sm'.length)))
(am'.End eval)
($'$"{!prefix}{!time_zone}{!guid_range}"' : string) |> convert
($'$"{!prefix}{!time_zone}{!guid_range}"' : string) |> guid.new_guid
run_target function
| Rust (Contract) => fun () => null ()
| Rust (Native | Wasm) => fun () =>
Expand Down
Loading

0 comments on commit dfa7c40

Please sign in to comment.