Przeglądaj źródła

full_example.sol was a full example a long time ago

Nowadays solang supports almost the entire language, so this is no
longer a full example.

Signed-off-by: Sean Young <sean@mess.org>
Sean Young 3 lat temu
rodzic
commit
2a69dbe797
3 zmienionych plików z 8 dodań i 14 usunięć
  1. 4 4
      docs/examples.rst
  2. 2 8
      examples/example.sol
  3. 2 2
      tests/substrate_tests/functions.rs

+ 4 - 4
docs/examples.rst

@@ -12,10 +12,10 @@ written in Solidity:
 .. include:: ../examples/flipper.sol
   :code: javascript
 
-Full Example
-------------
+Example
+-------
 
-This example exists to show the language features that Solang supports.
+A few simple arithmetic functions.
 
-.. include:: ../examples/full_example.sol
+.. include:: ../examples/example.sol
   :code: javascript

+ 2 - 8
examples/full_example.sol → examples/example.sol

@@ -1,11 +1,5 @@
-// full_example.sol
-
-/*
- This is an example contract to show all the features that the
- Solang Solidity Compiler supports.
-*/
-
-contract full_example {
+// example.sol
+contract example {
 	// Process state
 	enum State {
 		Running,

+ 2 - 2
tests/substrate_tests/functions.rs

@@ -288,7 +288,7 @@ fn test_loops() {
 }
 
 #[test]
-fn test_full_example() {
+fn test_example() {
     #[derive(Debug, PartialEq, Encode, Decode)]
     struct Val32(i32);
 
@@ -299,7 +299,7 @@ fn test_full_example() {
     struct ValBool(bool);
 
     // parse
-    let src = include_str!("../../examples/full_example.sol");
+    let src = include_str!("../../examples/example.sol");
 
     let mut runtime = build_solidity(src);