Fixed pivotal issue 75231994.

Specifically, added TestResults.EMPTY_FUNCTION_BLOCK_FAIL and
msg.emptyFunctionBlocksErrorMsg() so a different message is shown
for an empty function definition than for an empty repeat/if.
We'd still need to make sure that it had no statement connections.

I also prefer a more general solution, in case we want to add more distinct
messages in the future.


On Wed, Jul 23, 2014 at 11:57 AM, Bjvanminnen <notifications@github.com>
wrote:

> In src/feedback.js:
>
> >    var code = codegen.workspaceCode(Blockly);
> >    return (/\{\s*\}/).test(code);
> >  };
> >
> >  /**
> > + * Get an empty container block, if any are present.
> > + * @return {Blockly.Block} an empty container block, or null if none exist.
> > + */
> > +var getEmptyContainerBlock = function() {
>
> Would it be simpler to just replace this with hasEmptyFunction(), then
> iterate through the blocks and check for one of type
> procedures_def[no]return?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/code-dot-org/blockly/pull/765/files#r15307780>.
>