anchor.diff:                            ?assertEqual(OrigMsg, MGDecoded)
                     end,
                     CodePoints).
  +
  +nif_encode_decode_oneof() ->
  +    with_tmpdir(
  +      fun(TmpDir) ->
  +              NEDM = gpb_nif_test_ed_oneof1,
  +              Defs = mk_one_oneof_field_of_each_type(),
  +              {ok, Code} = compile_nif_msg_defs(NEDM, Defs, TmpDir),
  +              in_separate_vm(
  +                TmpDir, NEDM, Code,
  +                fun() ->
  +                        nif_encode_decode_oneof(NEDM, Defs),
  +                        ok
  +                end)
  +      end).
  +
   
   nif_encode_decode_oneof(NEDM, Defs) ->
       [#gpb_oneof{fields=OFields}] = [O || {{msg, oneof1}, [O]} <- Defs],
  
positive.code:       end).
  
  nif_encode_decode() ->
      ProtocCanOneof = check_protoc_can_do_oneof(),
      with_tmpdir(
        fun(TmpDir) ->
                NEDM = gpb_nif_test_ed1,
  
negative.code:         [{TestDescr, TestFun}]}
         || {TestDescr, TestFun} <- Tests1]}}.
  
  nif_encode_decode_oneof_() ->
      ProtocCanOneof = check_protoc_can_do_oneof(),
      {Descr, Tests} =
          if ProtocCanOneof ->
                  {"Nif with oneof fields",
                   [{"encode decode", fun nif_encode_decode_oneof/0}]};
             true ->
                  {"Protoc < 2.6.0, not testing nifs with oneof", []}
          end,
      {Descr,
       {timeout, 300,  %% timeout for all tests
        [{timeout, 100, %% timeout for each test
          [{TestDescr, TestFun}]}
         || {TestDescr, TestFun} <- Tests]}}.
  
  nif_encode_decode_maps_() ->
      ProtocCanMapfields = check_protoc_can_do_mapfields(),
      {Descr, Tests} =
  