MCPcopy Create free account
hub / github.com/AI45Lab/Code / test_task_serialization

Function test_task_serialization

core/src/planning/mod.rs:511–523  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

509
510 #[test]
511 fn test_task_serialization() {
512 let task = Task::new("1", "Test task")
513 .with_priority(TaskPriority::High)
514 .with_status(TaskStatus::InProgress);
515
516 let json = serde_json::to_string(&task).unwrap();
517 let parsed: Task = serde_json::from_str(&json).unwrap();
518
519 assert_eq!(parsed.id, task.id);
520 assert_eq!(parsed.content, task.content);
521 assert_eq!(parsed.status, task.status);
522 assert_eq!(parsed.priority, task.priority);
523 }
524
525 // ========================================================================
526 // ExecutionPlan tests

Callers

nothing calls this directly

Calls 2

with_statusMethod · 0.45
with_priorityMethod · 0.45

Tested by

no test coverage detected