@@ -740,7 +740,7 @@ func TestTarget_WriteRunToml(t *testing.T) {
740740 }
741741 type args struct {
742742 projectDir string
743- general map [string ]interface {}
743+ general map [string ]any
744744 mod input.ModuleParams
745745 }
746746 tests := []struct {
@@ -750,6 +750,19 @@ func TestTarget_WriteRunToml(t *testing.T) {
750750 want string
751751 wantErr bool
752752 }{
753+ {
754+ name : "fail-with-nil-fname-field" ,
755+ fields : fields {},
756+ args : args {
757+ mod : input.ModuleParams {
758+ Order : []string {"topoaa" },
759+ Topoaa : map [string ]any {
760+ "param_fname" : nil ,
761+ },
762+ },
763+ },
764+ wantErr : true ,
765+ },
753766 {
754767 name : "pass" ,
755768 fields : fields {
@@ -762,7 +775,7 @@ func TestTarget_WriteRunToml(t *testing.T) {
762775 },
763776 args : args {
764777 projectDir : "_some-workdir" ,
765- general : map [string ]interface {} {
778+ general : map [string ]any {
766779 "receptor" : "receptor.pdb" ,
767780 "ligand" : "ligand.pdb" ,
768781 "int" : 10 ,
@@ -774,32 +787,32 @@ func TestTarget_WriteRunToml(t *testing.T) {
774787 },
775788 mod : input.ModuleParams {
776789 Order : []string {"topoaa" , "rigidbody" , "caprieval" , "flexref" , "caprieval.2" , "mdref" , "caprieval.3" },
777- Topoaa : map [string ]interface {} {
790+ Topoaa : map [string ]any {
778791 "some-param" : "some-value" ,
779792 },
780- Rigidbody : map [string ]interface {} {
793+ Rigidbody : map [string ]any {
781794 "some-other-param" : 10 ,
782795 "some_fname" : "ambig_ti" ,
783796 "another_fname" : "unambig" ,
784797 "other_fname" : "custom1" ,
785798 "someother_fname" : "custom2" ,
786799 "thereference_fname" : "ref" ,
787800 },
788- Caprieval : map [string ]interface {} {},
789- Flexref : map [string ]interface {} {
801+ Caprieval : map [string ]any {},
802+ Flexref : map [string ]any {
790803 "some-other-param" : 3.5 ,
791804 "array-int" : []int {1 , 2 , 3 },
792805 "array-float" : []float64 {1.1 , 2.2 , 3.3 },
793806 "array-string" : []string {"a" , "b" , "c" },
794807 "array-bool" : []bool {true , false , true },
795- "array-interface" : []interface {} {1 , 2.2 , "three" , true },
808+ "array-interface" : []any {1 , 2.2 , "three" , true },
796809 "expandable_" : []int {1 , 2 , 3 },
797810 },
798- Caprieval_2 : map [string ]interface {} {},
799- Mdref : map [string ]interface {} {
811+ Caprieval_2 : map [string ]any {},
812+ Mdref : map [string ]any {
800813 "some-other-param" : false ,
801814 },
802- Caprieval_3 : map [string ]interface {} {},
815+ Caprieval_3 : map [string ]any {},
803816 },
804817 },
805818 want : "_some-workdir/run.toml" ,
@@ -818,7 +831,7 @@ func TestTarget_WriteRunToml(t *testing.T) {
818831 },
819832 args : args {
820833 projectDir : "_some-workdir" ,
821- general : map [string ]interface {} {
834+ general : map [string ]any {
822835 "receptor" : "receptor.pdb" ,
823836 "ligand" : "ligand.pdb" ,
824837 "shape" : "shape.pdb" ,
@@ -831,10 +844,10 @@ func TestTarget_WriteRunToml(t *testing.T) {
831844 },
832845 mod : input.ModuleParams {
833846 Order : []string {"topoaa" , "rigidbody" },
834- Topoaa : map [string ]interface {} {
847+ Topoaa : map [string ]any {
835848 "some-param" : "some-value" ,
836849 },
837- Rigidbody : map [string ]interface {} {
850+ Rigidbody : map [string ]any {
838851 "some-other-param" : 10 ,
839852 "some_fname" : "ambig_ti" ,
840853 "another_fname" : "unambig" ,
@@ -859,7 +872,7 @@ func TestTarget_WriteRunToml(t *testing.T) {
859872 },
860873 args : args {
861874 projectDir : "unexisting-directory" ,
862- general : map [string ]interface {} {},
875+ general : map [string ]any {},
863876 mod : input.ModuleParams {},
864877 },
865878 want : "" ,
0 commit comments